#header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    --bg-color: transparent !important;
    border-radius: 0 !important;
    border-left: none;
    border-right: none;
    border-top: none;
}

#header-bar .glass-content {
    display: flex;
    flex-direction: column;
}

#tab-bar {
    display: flex;
    transition: all 0.3s ease;
    height: 42px;
}

#tab-bar::-webkit-scrollbar,
#tab-bar .glass-content::-webkit-scrollbar {
    height: 0;
    width: 0;
    display: none;
}

#tab-bar .glass-content {
    scrollbar-width: none;
}

.tab-item {
    cursor: pointer;
    user-select: none;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
}

.tab-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


body.tab-style-default #tab-bar {
    position: relative !important;
    --bg-color: transparent;
    height: 42px;
    align-items: flex-end;
    padding: 0 16px;
    padding-bottom: 0;
    gap: 4px;
    
    justify-content: flex-start;
    overflow-x: auto;
    border-radius: 0;
    transform: none;
}

body.tab-style-default #content-area {
    margin: 100px 10px 0 10px;
}

#nav-bar {
    height: 48px;
    padding: 0 16px;
    display: none;
    align-items: center;
    gap: 16px;
}

body.tab-style-default #nav-bar {
    display: flex;
}

.nav-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.address-bar-container {
    flex: 1;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 17px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.address-bar-container:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.lock-icon {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

#address-bar {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    width: 100%;
}

#address-bar::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

body.tab-style-default .tab-item {
    min-width: 120px;
    max-width: 200px;
    height: 34px;
    padding: 0 14px;
    margin-bottom: -1px;
    justify-content: space-between;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

body.tab-style-default .tab-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

body.tab-style-default .tab-item.active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

body.tab-style-default .tab-title {
    opacity: 1;
    transform: none;
    display: block;
    max-width: 140px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0;
}

body.tab-style-default .tab-item.active .tab-title {
    color: #fff;
}

body.tab-style-default .tab-close {
    opacity: 0;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: 0.2s;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
}

body.tab-style-default .tab-item:hover .tab-close {
    opacity: 1;
}

body.tab-style-default .tab-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

body.tab-style-default #new-tab-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    margin-left: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.6;
    transition: all 0.2s ease;
}

body.tab-style-default #new-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}


body.tab-style-dots #tab-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    gap: 8px;
    background: rgba(18, 18, 18, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
    height: auto;
}

body.tab-style-dots #content-area {
    margin: 10px 10px 0 10px;
}

body.tab-style-dots .tab-item {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
}

body.tab-style-dots .tab-item:hover,
body.tab-style-dots .tab-item.active {
    width: 200px;
    height: 36px;
    border-radius: 24px;
    padding: 0 36px 0 14px;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.08);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s, padding 0.3s;
}

body.tab-style-dots .tab-item.active {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.tab-style-dots .tab-title {
    display: block;
    opacity: 0;
    transform: translateX(-10px);
    color: #fff;
    font-size: 13px;
    pointer-events: none;
    transition: 0.2s;
    white-space: nowrap;
}

body.tab-style-dots .tab-item:hover .tab-title,
body.tab-style-dots .tab-item.active .tab-title {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

body.tab-style-dots .tab-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
}

body.tab-style-dots .tab-item:hover .tab-close,
body.tab-style-dots .tab-item.active .tab-close {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

body.tab-style-dots .tab-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.tab-style-dots #new-tab-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}


body.tab-style-vertical #tab-bar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 70px;
    flex-direction: column;
    padding: 20px 0;
    gap: 10px;
    background: rgba(24, 24, 27, 0.2);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: flex-start;
    border-radius: 0;
    transform: none;
    box-shadow: none;
    height: 100%;
    z-index: 2000;
}

body.tab-style-vertical #content-area {
    margin: 10px 10px 0 80px;
}

body.tab-style-vertical .tab-item {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

body.tab-style-vertical .tab-item:hover,
body.tab-style-vertical .tab-item.active {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    justify-content: center;
    padding: 0;
}

body.tab-style-vertical .tab-item.active {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.tab-style-vertical #new-tab-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}


body.tab-style-radial #tab-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    pointer-events: none;
    justify-content: center;
    align-items: flex-end;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
}

body.tab-style-radial #content-area {
    margin: 10px 10px 0 10px;
}

body.tab-style-radial .tab-item {
    pointer-events: auto;
    position: absolute;
    bottom: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.tab-style-radial .tab-item:hover,
body.tab-style-radial .tab-item.active {
    transform: scale(1.2) translateY(-10px);
    z-index: 10;
    background: var(--bg-main);
    color: #fff;
}

body.tab-style-radial #new-tab-btn {
    position: absolute;
    bottom: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    z-index: 1001;
}

#content-area {
    flex: 1;
    position: relative;
    z-index: 50;
    overflow: hidden;
    margin: 10px 10px 0 10px;
    border-radius: 12px;
    background: transparent;
    display: flex;
    flex-direction: column;
}

.tab-content {
    width: 100%;
    height: 100%;
    display: none;
    background: var(--bg-main);
    border-radius: 12px;
    overflow: hidden;
}

.tab-content iframe {
    border: none;
}

.tab-content.app-internal {
    background: transparent;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    flex: 1;
}