/**
 * Shared Header/Nav/Footer Styles for Oddsphere
 * ONLY includes styles that are 100% identical across all pages
 * Page-specific table layouts remain in individual files
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    background-color: #2a2a2a;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    padding: 17px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    background-color: #1f1f1f;
}

/* Hamburger Menu */
.hamburger-menu-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Hide About in hamburger menu on desktop, show only on mobile */
.hamburger-menu-about {
    display: none;
}

.hamburger-menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 6px;
}

.hamburger-menu-toggle:hover {
    color: #b8efc0;
    background-color: rgba(184, 239, 192, 0.1);
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.hamburger-menu-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    display: none;
    flex-direction: column;
    gap: 0;
    min-width: 200px;
    padding: 8px;
    background: #1f1f1f;
    border: 1px solid #323232;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.hamburger-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 24px;
    width: 16px;
    height: 16px;
    background: #1f1f1f;
    border-top: 1px solid #323232;
    border-left: 1px solid #323232;
    transform: rotate(45deg);
}

.hamburger-menu-container.open .hamburger-menu-dropdown {
    display: flex;
}

.hamburger-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.hamburger-menu-link:hover {
    background-color: #2a2a2a;
    color: #b8efc0;
}

.hamburger-menu-link.active {
    background-color: rgba(184, 239, 192, 0.1);
    color: #b8efc0;
}

.hamburger-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Header Separator */
.header-separator {
    width: 1px;
    height: 32px;
    background-color: #444;
    margin: 0 2px 0 4px;
}

.logo {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.site-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.02em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 0.9;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Navigation Styles */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #b8efc0;
}

.nav-link.active {
    color: #b8efc0;
}

.nav-dropdown {
    position: relative;
    padding-bottom: 18px;
    margin-bottom: -18px;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
}

.nav-dropdown.active > .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
    color: #b8efc0;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% - 6px);
    left: 0;
    background: #262626;
    border: 1px solid #343434;
    border-radius: 10px;
    padding: 10px 0;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    display: none;
    flex-direction: column;
    z-index: 10;
}

.nav-dropdown.open > .nav-dropdown-menu,
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-dropdown-link:hover {
    background-color: #343434;
    color: #b8efc0;
}

.nav-dropdown-link.active {
    color: #b8efc0;
    background-color: #2f3b30;
}

.nav-caret {
    width: 10px;
    height: 10px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-caret {
    transform: rotate(180deg);
}

/* Header Action Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.discord-btn {
    background-color: #5865F2;
}

.discord-btn:hover {
    background-color: #4752C4;
}

.upgrade-btn {
    display: none !important;
}

.signin-btn {
    background-color: #b8efc0;
    color: #1f1f1f;
    border: none;
    cursor: pointer;
}

.signin-btn:hover {
    background-color: #9fceaa;
}

/* Sign In Dropdown */
.signin-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.signin-caret {
    width: 12px;
    height: 12px;
    fill: currentColor;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.signin-dropdown.open .signin-caret {
    transform: rotate(180deg);
}

.signin-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    display: none;
    flex-direction: column;
    gap: 0;
    min-width: 240px;
    padding: 8px;
    background: #1f1f1f;
    border: 1px solid #323232;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.signin-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: #1f1f1f;
    border-top: 1px solid #323232;
    border-left: 1px solid #323232;
    transform: rotate(45deg);
}

.signin-dropdown.open .signin-dropdown-menu {
    display: flex;
}

.signin-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.signin-dropdown-link:hover {
    background-color: #2a2a2a;
}

.signin-dropdown-divider {
    height: 1px;
    background: #343434;
    margin: 4px 8px;
}

.oddsphere-plus-link {
    background-color: rgba(184, 239, 192, 0.1);
    color: #b8efc0;
    font-weight: 600;
}

.oddsphere-plus-link:hover {
    background-color: rgba(184, 239, 192, 0.2);
    color: #b8efc0;
}

.signin-provider-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.profile-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Profile/User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #444;
    background-color: #333;
}

.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    border: 1px solid #343434;
    background: #262626;
    cursor: pointer;
    color: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.profile-toggle:hover {
    border-color: #4c4c4c;
    background: #2f2f2f;
}

.profile-toggle:focus-visible {
    outline: 2px solid #5865F2;
    outline-offset: 2px;
}

.profile-caret {
    width: 12px;
    height: 12px;
    fill: #b8efc0;
    transition: transform 0.2s ease;
}

.profile-dropdown.open .profile-caret {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    padding: 18px 18px 16px;
    background: #1f1f1f;
    border: 1px solid #323232;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.profile-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: #1f1f1f;
    border-top: 1px solid #323232;
    border-left: 1px solid #323232;
    transform: rotate(45deg);
}

.profile-dropdown.open .profile-menu {
    display: flex;
}

.profile-username {
    font-size: 14px;
    color: #a9a9a9;
    line-height: 1.4;
    margin-bottom: 8px;
}

.profile-username strong {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    background: #2a2a2a;
    color: #b8efc0;
    transition: background-color 0.2s ease;
}

.profile-link:hover {
    background: #333;
}

.profile-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    background: #3a3a3a;
    color: #ff6b6b;
    transition: background-color 0.2s ease;
}

.profile-logout:hover {
    background: #444;
    color: #ff8787;
}

.btn-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Footer Styles */
.footer {
    background-color: #1a1a1a;
    color: #888;
    padding: 30px 20px 20px;
    text-align: center;
    font-size: 13px;
    border-top: 1px solid #333;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.footer-link {
    color: #b8efc0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #9fceaa;
}

.footer-email {
    color: #b8efc0;
    text-decoration: none;
}

.footer-email:hover {
    text-decoration: underline;
}

.footer-copyright {
    margin-bottom: 10px;
}

.footer-responsible {
    font-size: 11px;
    color: #666;
    margin-top: 15px;
    line-height: 1.4;
}

/* Mobile Responsive - Header/Nav/Footer Only */
@media (max-width: 768px) {
    .signin-text {
        display: none;
    }

    .nav-dropdown {
        width: auto;
        padding-bottom: 8px;
        margin-bottom: -8px;
    }

    /* On mobile: hide About from main nav, show in hamburger menu */
    .nav-link[href="/about"] {
        display: none !important;
    }

    .hamburger-menu-about {
        display: flex !important;
    }

    .upgrade-btn,
    .discord-btn {
        display: none !important;
    }

    .header {
        padding: 14px 16px;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .logo {
        height: 28px;
        width: 28px;
        flex-shrink: 0;
    }

    .header-left {
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .nav-menu {
        gap: 8px;
        font-size: 14px;
        flex-wrap: nowrap;
        overflow: visible;
        padding-bottom: 4px;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-link,
    .nav-dropdown-toggle {
        font-size: 14px;
        padding: 4px 8px;
        white-space: nowrap;
    }

    .nav-dropdown-toggle {
        justify-content: center;
        gap: 4px;
    }

    .nav-caret {
        width: 8px;
        height: 8px;
    }

    .nav-dropdown-menu {
        top: calc(100% + 4px);
        left: 0;
        right: auto;
        min-width: 160px;
        width: auto;
    }

    .header-actions {
        gap: 8px;
        flex-shrink: 0;
    }

    .header-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .profile-toggle {
        padding-right: 8px;
        gap: 8px;
    }

    .footer {
        font-size: 12px;
    }

    .footer-links {
        gap: 15px;
    }
}
