/* ====== css/main.css ====== */
/* FSDC Main Styles — Dark Mode Only, Mobile-First */

/* ====== variables ====== */
:root {
    --font-primary: 'Cairo', sans-serif;
    --primary: #034667;
    --secondary-1: #8CFF9E;
    --secondary-2: #8CFF9E;
    --white: #FFFFFF;
    --bg-primary: #0a1628;
    --bg-secondary: #0f1f35;
    --bg-tertiary: #132840;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.45);
    --border-color: rgba(255,222,89,0.12);
    --accent: #FFDE59;
    --accent-green: #8CFF9E;
    --accent-glow: rgba(255,222,89,0.12);
    --gradient-main: linear-gradient(135deg, #FFDE59 0%, #8CFF9E 100%);
    --gradient-header: linear-gradient(135deg, #FFDE59 0%, #8CFF9E 50%, #FFDE59 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* ====== loading screen ====== */
.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 9999;
    transition: opacity 0.4s;
}
.loading-screen.fade-out { opacity: 0; pointer-events: none; }
.loading-logo {
    width: 100px;
    height: 100px;
    animation: pulseLogo 1.4s ease-in-out infinite;
}
.loading-logo img { width: 100%; height: 100%; object-fit: contain; }

@keyframes pulseLogo {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50%      { opacity: 1;   transform: scale(1.06); }
}

/* ====== app shell ====== */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ====== top bar ====== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    background: var(--gradient-header);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    gap: 8px;
    flex-wrap: nowrap;
    min-height: 47.6px;
    height: auto;
}
.top-bar-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.top-bar-logo {
    height: 39.6px;
    width: auto;
    max-width: 100%;
}
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ====== partners in top bar ====== */
.partners-group {
    display: flex;
    align-items: center;
    gap: 5px;
}
.partners-group a {
    display: flex;
    align-items: center;
    line-height: 0;
}
.partner-logo {
    height: 32.34px;
    width: 32.34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(3,70,103,0.25);
    opacity: 0.95;
    transition: opacity 0.2s, transform 0.2s;
    display: block;
}
.partner-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ====== top icon button ====== */
.top-icon-btn {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(3,70,103,0.2);
    color: #034667;
    width: 32.34px;
    height: 32.34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.748rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: var(--font-primary);
    flex-shrink: 0;
}
.top-icon-btn:hover {
    background: rgba(255,255,255,0.7);
    border-color: #034667;
}
.logout-icon {
    font-size: 0.75rem;
}

/* ====== login button ====== */
.login-btn {
    background: #034667;
    color: #FFFFFF;
    border: none;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.79rem;
    padding: 6.3px 14.7px;
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(3,70,103,0.3);
}
.login-btn:hover {
    background: #023551;
    box-shadow: 0 4px 16px rgba(3,70,103,0.4);
    transform: translateY(-1px);
}
.logout-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: none;
}
.logout-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 10px rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.1);
}

/* ====== nav tabs ====== */
.nav-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 56px;
    z-index: 99;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px 12px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}
.nav-tab-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.tactics-icon {
    width: 16.2px;
    height: 16.2px;
    filter: brightness(0) saturate(100%) invert(55%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(90%) contrast(90%);
}
.nav-tab .soon-badge {
    font-size: 0.6rem !important;
    color: #ef4444;
    font-weight: 800;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    pointer-events: none;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
    z-index: 2;
    letter-spacing: 0.5px;
}
.nav-tab:hover { color: var(--text-primary); }
.nav-tab:hover .nav-tab-icon { color: var(--text-primary); }
.nav-tab.active {
    color: #8CFF9E;
    border-bottom-color: #8CFF9E;
}
.nav-tab.active .nav-tab-icon { color: #8CFF9E; }
.nav-tab.active .nav-tab-icon { color: #FFDE59; }

/* ====== main content ====== */
.main-content {
    flex: 1;
    padding: 20px 16px;
}

/* ====== bottom bar — REMOVED ====== */

/* ====== popups ====== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.popup-overlay.show { display: flex; }

.popup-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}
.popup-box h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.popup-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ====== google login button ====== */
.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.google-login-btn:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ====== form inputs ====== */
.popup-box input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    margin-bottom: 8px;
    text-align: center;
}
.manager-id-note {
    font-size: 0.7rem;
    color: #ef4444;
    margin-bottom: 16px;
}
.modal-message {
    font-size: 0.8rem;
    margin-top: 8px;
    display: none;
}
.modal-message.error { color: #ef4444; display: block; }
.modal-message.success { color: #10b981; display: block; }

.manager-id-help-link {
    display: block;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

.popup-close {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    transition: color 0.2s;
}
.popup-close:hover { color: var(--text-primary); }

.intro-box {
    max-width: 400px;
}

.intro-box h2 {
    color: #8CFF9E;
    margin-bottom: 12px;
}

.intro-box p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ====== homepage ====== */
.home-hero {
    text-align: center;
    padding: 32px 16px 16px;
}
.home-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.home-hero p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ====== countdown on homepage ====== */
.home-countdown {
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    display: inline-block;
    min-width: auto;
    width: fit-content;
}
.home-countdown .countdown {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.home-countdown .countdown-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ====== responsive ====== */
@media (min-width: 768px) {
    .nav-tab { font-size: 0.85rem; padding: 12px 18px; }
    .home-hero h1 { font-size: 2rem; }
    .main-content { padding: 32px 24px; }
    .top-bar-logo { height: 48px; }
}
/* Mobile only - reduce tab icons */
@media (max-width: 899px) {
    .nav-tab-icon {
        font-size: 0.81rem;
    }
    
    .tactics-icon {
        width: 14.6px;
        height: 14.6px;
    }
}
/* PC only - increase tab icons */
@media (min-width: 900px) {
    .nav-tab-icon {
        font-size: 0.99rem;
    }
    
    .tactics-icon {
        width: 17.8px;
        height: 17.8px;
    }
}
/* Mobile only - nav tabs scrollable */
@media (max-width: 899px) {
    .nav-tabs {
        position: relative;
        top: 0;
    }
}
