.header {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid var(--border);
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}
/* FOUC Prevention for Web Component */
site-header:not(:defined) {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

site-header:not(:defined):before {
    content: '';
    display: block;
    width: 1200px;
    margin: 0 auto;
    height: 40px;
    background: transparent;
}

/* Skeleton Loading Utilities */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
    background-color: var(--border);
    border-radius: 0.75rem;
}

.skeleton-btn {
    width: 80px;
    height: 38px;
}

@keyframes skeleton-loading {
    0% { background-color: var(--surface, #f8fafc); }
    100% { background-color: var(--border, #e2e8f0); }
}

body {
    padding-top: 80px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.header-quick-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.header-menu {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-container {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    gap: 0.6rem; /* Slightly increased gap for flag */
    padding: 0 1rem;
    height: 38px;
    box-sizing: border-box;
}

.lang-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.lang-dropdown-btn:hover {
    background: var(--surface);
    border-color: var(--primary-light);
}

.lang-dropdown-btn::after {
    content: '▼';
    font-size: 0.6rem;
    opacity: 0.5;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #F8FAFC;
    min-width: 140px;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    padding: 0.5rem;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.lang-dropdown.active .lang-dropdown-content {
    display: block;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.75rem;
}

.lang-dropdown-item img {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.lang-dropdown-item:hover {
    background: var(--surface);
    color: var(--primary);
}

.lang-dropdown-item.active {
    background: var(--primary);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Redesign */
.footer {
    background: #F8FAFC;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-top {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
}

.footer-top .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
}

.footer-top .logo {
    margin-bottom: 0.75rem;
}

.footer-top .footer-brand p {
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 4rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-icon:hover svg {
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .header .container {
        padding: 0 1rem;
    }

    .footer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 3rem;
    }

    .footer-left {
        align-items: center;
    }
}

/* Content Pages Wrapper */
.content-pages {
    padding: 60px 0;
    background: var(--surface);
    min-height: calc(100vh - 300px);
}

/* Music Controller Styles */
.music-dropdown {
    position: relative;
}

.music-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.music-btn:hover {
    background: var(--surface) !important;
    transform: scale(1.05);
}

.music-btn.playing {
    color: var(--text-primary);
    border: none;
    background: transparent;
    box-shadow: none;
}

.music-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #F8FAFC;
    min-width: 180px;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    padding: 1rem;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.music-dropdown.active .music-dropdown-content {
    display: block;
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 140px;
}

.volume-icon {
    font-size: 1rem;
}

#music-volume {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

#music-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

#music-volume::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

@keyframes music-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.music-icon-playing {
    animation: music-pulse 2s infinite ease-in-out;
}
