/**
 * Shards Chat Site Configuration Styles
 * ================================
 * Styles for navigation, staging banner, and SITE_LIVE toggle elements
 */

/* ============================================
   Navigation Bar
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    background: linear-gradient(45deg, #FFD700, #FF6B6B, #4ECDC4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flower-icon-small svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #FFD700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #4ECDC4);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white !important;
    font-weight: 600;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
}

/* Adjust nav when staging banner is present */
body:has(.staging-banner) .main-nav {
    top: 40px;
}

/* Adjust hero for fixed nav */
.hero {
    padding-top: 80px !important;
}


/* ============================================
   Staging Banner
   ============================================ */
.staging-banner {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #1a1a1a;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

/* Admin Preview Mode Banner (distinct color) */
.staging-banner.admin-preview {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
    color: white;
}

.staging-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.staging-icon {
    font-size: 1.1rem;
}

/* Adjust nav and hero when staging banner is present */
body:has(.staging-banner) .hero {
    padding-top: 120px !important;
}


/* ============================================
   Status Badge Variants
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.status-badge.live {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-badge.staging {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge.live .pulse {
    background: #4ade80;
}

.status-badge.staging .pulse {
    background: #fbbf24;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}


/* ============================================
   Status Indicators
   ============================================ */
.status-online {
    color: #4ade80;
}

.status-coming-soon {
    color: #fbbf24;
}

.status-offline {
    color: #ef4444;
}


/* ============================================
   Live/Staging Conditional Display
   ============================================ */
[data-live-only] {
    /* Shown only when SITE_LIVE=true */
}

[data-staging-only] {
    /* Shown only when SITE_LIVE=false */
}

[data-auth-only] {
    /* Shown only when user is authenticated */
}

[data-guest-only] {
    /* Shown only when user is NOT authenticated */
}


/* ============================================
   Authentication UI
   ============================================ */
.nav-auth-btn {
    margin-left: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}


/* ============================================
   Authenticated User Welcome Section
   ============================================ */
.user-welcome {
    padding: 3rem 2rem;
    background: linear-gradient(180deg, rgba(78, 205, 196, 0.1) 0%, rgba(10, 14, 39, 0) 100%);
}

.welcome-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card > p {
    color: #b0b0b0;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.quick-connect-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.connect-option {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.connect-option:hover {
    transform: translateY(-5px);
    border-color: rgba(78, 205, 196, 0.5);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.2);
}

.option-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.connect-option h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.connect-option p {
    color: #b0b0b0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .quick-connect-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   Coming Soon Section (Staging Only)
   ============================================ */
.coming-soon-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, rgba(10, 14, 39, 0) 100%);
}

.coming-soon-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coming-soon-card p {
    color: #b0b0b0;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.soon-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 0.95rem;
}

.soon-check {
    font-size: 1.1rem;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.4);
}

.discord-icon {
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .coming-soon-features {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   Page-Specific Styles
   ============================================ */

/* Downloads Page */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.download-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.download-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-light, #fff);
}

.download-card .card-icon {
    font-size: 1.5rem;
}

.download-card p {
    color: var(--text-gray, rgba(255, 255, 255, 0.7));
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.download-card .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.download-card .btn-download {
    background: linear-gradient(135deg, #4ECDC4, #44a08d);
    color: white;
}

.download-card .btn-download:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.download-card .btn-external {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light, #fff);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-card .btn-external:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.download-section {
    margin-bottom: 3rem;
}

.download-section h2 {
    color: var(--text-light, #fff);
    margin-bottom: 0.5rem;
}

.download-section > p {
    color: var(--text-gray, rgba(255, 255, 255, 0.7));
    margin-bottom: 1.5rem;
}

.untested-badge {
    display: inline-block;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}


/* Web Client Page */
.webclient-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
}

.webclient-hero {
    margin-bottom: 3rem;
}

.webclient-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FFD700, #FF6B6B, #4ECDC4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.webclient-hero p {
    color: var(--text-gray, rgba(255, 255, 255, 0.7));
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.webclient-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.webclient-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
}

.launch-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(78, 205, 196, 0.5);
}

.launch-btn .icon {
    font-size: 1.5rem;
}

.webclient-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .webclient-features {
        grid-template-columns: 1fr;
    }
}

.webclient-feature {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
}

.webclient-feature .icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.webclient-feature h3 {
    color: var(--text-light, #fff);
    margin-bottom: 0.5rem;
}

.webclient-feature p {
    color: var(--text-gray, rgba(255, 255, 255, 0.7));
    font-size: 0.9rem;
}


/* Construction Page */
.construction-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);
    padding: 2rem;
    text-align: center;
}

.construction-content {
    max-width: 600px;
}

.construction-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.construction-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-light, #fff);
}

.construction-content p {
    color: var(--text-gray, rgba(255, 255, 255, 0.7));
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.construction-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.construction-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-bypass-hint {
    margin-top: 3rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-gray, rgba(255, 255, 255, 0.5));
    font-size: 0.85rem;
}

.admin-bypass-hint code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}
