/* --- RESET & VARIABLES --- */
:root {
    --bg-deep: #000000;       /* Pure Void Black */
    
    /* MODIFIED: More transparent glass (0.15) */
    --glass: rgba(15, 20, 30, 0.15); 
    
    --glass-heavy: rgba(10, 15, 25, 0.95); 
    
    /* MODIFIED: Soft Pastel Red Accent (#ff6b6b) */
    --accent: #ff6b6b;        
    
    /* MODIFIED: Red Glow */
    --accent-glow: rgba(255, 107, 107, 0.3);
    
    --glass-border: rgba(255, 107, 107, 0.2);
    --text-main: #ffffff;
    --text-muted: #8899a6;
    --danger: #ff3366;
    --success: #00ff88;
}

body, html { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Roboto, Helvetica, sans-serif; 
    background: var(--bg-deep); 
    color: var(--text-main); 
    overflow-x: hidden; 
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* --- CUSTOM SCROLLBAR (Space Theme) --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- STARS LAYER --- */
#starfield { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 0; 
    pointer-events: none; 
}

/* --- NAVIGATION --- */
.navbar { 
    position: fixed; top: 0; width: 100%; padding: 15px 20px; 
    display: flex; justify-content: space-between; align-items: center; 
    background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(10px); 
    border-bottom: 1px solid var(--glass-border); 
    z-index: 1000; box-sizing: border-box; 
}
.logo { font-size: 1.4rem; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; color: white; }
.logo i { color: var(--accent); margin-right: 10px; }

.nav-links { display: flex; align-items: center; gap: 25px; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; transition: 0.3s; letter-spacing: 1px; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
.admin-link { border: 1px solid var(--accent); padding: 5px 15px; border-radius: 20px; color: var(--accent) !important; }
.admin-link:hover { background: var(--accent); color: #000 !important; box-shadow: 0 0 15px var(--accent-glow); }

/* Mobile Menu */
.nav-toggle-label { display: none; cursor: pointer; color: white; font-size: 1.5rem; }
#nav-toggle { display: none; }

/* --- HERO SECTION --- */
.hero-overlay { 
    height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; 
    position: relative; z-index: 1; padding: 20px;
}
.hero-content { 
    background: var(--glass); /* Now using 0.15 transparency */
    padding: 60px 40px; 
    border-radius: 20px; 
    border: 1px solid var(--glass-border); 
    backdrop-filter: blur(8px); 
    text-align: center; 
    max-width: 700px; 
    box-shadow: 0 0 80px rgba(0,0,0,0.8);
}
.hero-content h1 { 
    font-size: 2.8rem; margin: 0 0 25px 0; line-height: 1.2; text-transform: uppercase; letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #ffcccb); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.cta-button { 
    display: inline-block; padding: 15px 50px; 
    background: transparent; color: var(--accent); border: 1px solid var(--accent); 
    font-weight: bold; text-decoration: none; border-radius: 30px; letter-spacing: 2px; transition: 0.3s; 
}
.cta-button:hover { background: var(--accent); color: #000; box-shadow: 0 0 25px var(--accent-glow); }

.scroll-indicator { position: absolute; bottom: 30px; color: var(--text-muted); font-size: 1.5rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform:translateY(0);} 40% {transform:translateY(-10px);} 60% {transform:translateY(-5px);} }

/* --- SECTIONS --- */
.content-wrapper { position: relative; z-index: 2; background: #050508; border-top: 1px solid var(--glass-border); padding-bottom: 0; }
.section-box { max-width: 1200px; margin: 0 auto; padding: 80px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.section-box h2 { color: var(--accent); font-size: 2rem; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 2px; text-align: center; }
.text-content p { max-width: 800px; margin: 0 auto; line-height: 1.8; color: var(--text-muted); font-size: 1.1rem; text-align: center; }

/* --- CARDS & GRID --- */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px; 
    align-items: stretch; 
}

.class-card { 
    background: #0f1724; 
    padding: 30px; 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.05); 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    box-sizing: border-box;
    transition: 0.4s; 
    cursor: default;
    position: relative;
    overflow: hidden;
}

.class-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.news-card { cursor: pointer; }

/* Wrapper inside card for text content */
.class-card .card-content {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.class-card h4 { font-size: 1.4rem; margin: 0 0 10px 0; color: white; }
.class-card .meta { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 1px; }
.class-card p { color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }

.spots { font-weight: bold; margin-top: auto; margin-bottom: 20px; font-size: 0.9rem; }
.spots.good { color: var(--success); }
.spots.low { color: var(--danger); }

/* --- GALLERY GRID --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    font-weight: bold;
    transform: translateY(100%);
    transition: 0.3s;
}
.gallery-item:hover .gallery-overlay { transform: translateY(0); }

/* --- FORMS & INPUTS --- */
input, textarea { 
    width: 100%; background: #0a0f18; border: 1px solid #2d3748; padding: 15px; margin-bottom: 15px; 
    color: white; border-radius: 6px; box-sizing: border-box; font-family: inherit; 
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 10px rgba(255, 107, 107, 0.1); }

button, .card-btn { 
    background: var(--accent); color: #000; border: none; padding: 12px; border-radius: 6px; 
    font-weight: bold; cursor: pointer; transition: 0.3s; width: 100%; text-transform: uppercase; letter-spacing: 1px;
    margin-top: auto; 
}
button:hover, .card-btn:hover { background: white; box-shadow: 0 0 15px var(--accent-glow); }
button:disabled { background: #333; color: #666; cursor: not-allowed; box-shadow: none; }
.btn-delete { background: var(--danger); color: white; width: auto; padding: 6px 15px; font-size: 0.8rem; margin: 0; }
.btn-delete:hover { background: #d00; color: white; }

/* --- ADMIN DASHBOARD --- */
.admin-body { background: var(--bg-deep); } 
.admin-header { 
    background: #0a0f18; padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 1px solid #2d3748; position: relative; z-index: 10; 
}
.admin-container { 
    max-width: 1200px; margin: 40px auto; padding: 0 20px; position: relative; z-index: 10; 
}
.admin-card { 
    background: var(--glass-heavy); 
    padding: 30px; margin-bottom: 20px; border: 1px solid #2d3748; border-radius: 12px; 
    display: flex; flex-direction: column;
}
.admin-grid-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 25px; }

.admin-list {
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 5px;
}
.list-item { padding: 15px; border-bottom: 1px solid #2d3748; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); }
.list-item:last-child { border-bottom: none; }

.glass-panel { background: var(--glass-heavy); border: 1px solid #2d3748; border-radius: 12px; padding: 40px; position: relative; z-index: 10; }

/* Tabs */
.tabs { margin-bottom: 20px; border-bottom: 1px solid #2d3748; }
.tab-btn { background: none; width: auto; padding: 10px 25px; color: #64748b; border-bottom: 2px solid transparent; border-radius: 0; margin-top: 0; }
.tab-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.tab-btn.active { color: var(--accent); border-bottom: 2px solid var(--accent); background: transparent; box-shadow: none; }
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- FAQ & EXTRAS --- */
.faq-item { background: #0f1724; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 10px; border-radius: 8px; overflow: hidden; }
.faq-question { padding: 20px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; transition: 0.3s; }
.faq-question:hover { color: var(--accent); background: rgba(255,255,255,0.02); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: 0.3s; color: var(--text-muted); line-height: 1.6; background: #0a0f18; }
.faq-question.active + .faq-answer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 30px; }
.contact-info p { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; color: var(--text-muted); }
.contact-info i { color: var(--accent); font-size: 1.2rem; }

/* --- MODALS --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.modal-content { 
    background: #151f32; margin: 10vh auto; padding: 40px; width: 90%; max-width: 600px; 
    border: 1px solid var(--accent); border-radius: 16px; position: relative; 
    box-shadow: 0 0 50px rgba(255, 107, 107, 0.2); 
    animation: zoomIn 0.3s;
}
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.close { position: absolute; right: 20px; top: 15px; font-size: 2rem; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.close:hover { color: white; }

.roster-table { width: 100%; border-collapse: collapse; color: var(--text-muted); }
.roster-table th { text-align: left; padding: 10px; border-bottom: 1px solid #444; color: var(--accent); }
.roster-table td { padding: 10px; border-bottom: 1px solid #333; }

#toast { visibility: hidden; min-width: 250px; background: #151f32; border: 1px solid var(--accent); color: white; text-align: center; padding: 16px; position: fixed; z-index: 3000; left: 50%; bottom: 30px; transform: translateX(-50%); border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,0.8); }
#toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* --- FOOTER --- */
footer { 
    text-align: center; padding: 40px 0; border-top: 1px solid #111; 
    color: #444; font-size: 0.8rem; background: #000; 
    text-transform: uppercase; letter-spacing: 2px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .nav-toggle-label { display: block; position: absolute; top: 20px; right: 20px; z-index: 1001; }
    .nav-links { 
        position: fixed; top: 0; right: 0; width: 70%; height: 100vh; 
        background: #0f1724; border-left: 1px solid var(--glass-border);
        flex-direction: column; padding-top: 80px; transform: translateX(100%); transition: 0.3s; 
    }
    #nav-toggle:checked ~ .nav-links { transform: translateX(0); box-shadow: -10px 0 50px rgba(0,0,0,0.8); }
    .hero-content h1 { font-size: 2rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .modal-content { margin: 15vh auto; width: 85%; padding: 25px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
}