@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #070a12;
    --bg-card: rgba(17, 24, 39, 0.65);
    --bg-card-hover: rgba(31, 41, 55, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --primary-neon: #6366f1;
    --primary-neon-glow: rgba(99, 102, 241, 0.5);
    --secondary-neon: #22d3ee;
    --secondary-neon-glow: rgba(34, 211, 238, 0.5);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-bright: #ffffff;
    
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    --gradient-purple-cyan: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(7, 10, 18, 0.8) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-bright);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Typewriter Blinking Cursor */
.typewriter-cursor {
    display: inline-block;
    color: var(--secondary-neon);
    font-weight: 300;
    animation: blink 0.8s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Glassmorphism Container */
.glass-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-container:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Floating Navbar */
.navbar {
    position: sticky;
    top: 16px;
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 1280px;
    margin: 16px auto;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    text-decoration: none;
    background: var(--gradient-purple-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar-nav {
    display: flex;
    gap: 6px;
    list-style: none;
    align-items: center;
    flex-wrap: nowrap;
}

.navbar-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.navbar-nav a:hover, 
.navbar-nav a.active {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.08);
}

.navbar-btn {
    background: var(--gradient-purple-cyan);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--primary-neon-glow);
    transition: transform 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}

.navbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.6);
}

/* Mobile responsive menu */
@media (max-width: 1024px) {
    .navbar-nav a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 860px) {
    .navbar {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 12px 16px;
    }
    .navbar-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        padding-top: 10px;
        margin-top: 8px;
        border-top: 1px solid var(--border-color);
    }
}

/* Grid & Layout System */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.hero-section {
    padding: 80px 0 40px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 16px;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient-purple-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

/* Interactive Search & Categories */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
    justify-content: space-between;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 15px var(--primary-neon-glow);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-neon);
    border-color: var(--primary-neon);
    color: #fff;
    box-shadow: 0 0 12px var(--primary-neon-glow);
}

/* School Cards & Badges */
.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.school-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s, box-shadow 0.3s;
}

.school-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
}

.school-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.school-category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badges-row {
    display: flex;
    gap: 6px;
}

.spotlight-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.spotlight-badge.partner {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.spotlight-badge.grant {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    animation: goldGlow 2s infinite ease-in-out;
}

@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 3px rgba(251, 191, 36, 0.1); }
    50% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }
}

.school-card-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.school-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.school-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.metrics-tracker {
    display: flex;
    gap: 12px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--text-bright);
}

.modal-body {
    padding: 24px;
}

/* Onboarding Wizard */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
}

.wizard-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-purple-cyan);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 2px;
}

.wizard-step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    transition: all 0.4s;
    color: var(--text-muted);
}

.wizard-step-node.active {
    border-color: var(--primary-neon);
    color: var(--text-bright);
    box-shadow: 0 0 15px var(--primary-neon-glow);
    background: var(--primary-neon);
}

.wizard-step-node.completed {
    border-color: var(--secondary-neon);
    color: #0f172a;
    background: var(--secondary-neon);
    box-shadow: 0 0 15px var(--secondary-neon-glow);
}

.wizard-card {
    max-width: 700px;
    margin: 0 auto;
}

.wizard-step-panel {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.wizard-step-panel.active {
    display: block;
}

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

.wizard-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

/* Custom form fields */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-bright);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-purple-cyan);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-neon-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-bright);
}

/* Route selection buttons */
.route-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.route-card {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    padding: 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.route-card:hover, .route-card.selected {
    border-color: var(--primary-neon);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.route-price {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 16px 0;
    color: var(--secondary-neon);
}

/* Live Countdown timer for cooldown */
.countdown-clock {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 18px;
    min-width: 70px;
    text-align: center;
}

.countdown-val {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--secondary-neon);
}

.countdown-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Dashboard Hub Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.metric-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.metric-card-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-bright);
    margin-top: 8px;
}

.metric-card-val.robux {
    color: var(--accent-warning);
}

/* Data Tables / Ledger */
.ledger-wrapper {
    overflow-x: auto;
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    text-align: left;
}

.ledger-table th,
.ledger-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.ledger-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-bright);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.01);
}

.ledger-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Shop Products Catalogue */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-neon);
    margin: 12px 0;
}

/* Partnerships network cards with 3D hover effects */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.partner-card {
    perspective: 1000px;
}

.partner-card-inner {
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
}

/* Lottery countdown styling */
.lottery-hero {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-radius: 24px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    margin-bottom: 40px;
}

.lottery-ticket {
    max-width: 500px;
    margin: 40px auto 0;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f0b29 100%);
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.lottery-ticket::before,
.lottery-ticket::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--bg-dark);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.lottery-ticket::before { left: -14px; }
.lottery-ticket::after { right: -14px; }

.ticket-header {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.ticket-barcode {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.ticket-hash {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* Policies accordion styling */
.policy-item {
    border-bottom: 1px solid var(--border-color);
}

.policy-header {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.policy-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.policy-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.policy-item.active .policy-content {
    max-height: 500px;
    padding-bottom: 20px;
}

.policy-icon {
    transition: transform 0.3s;
}

.policy-item.active .policy-icon {
    transform: rotate(180deg);
}

/* Alert Boxes */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

/* Utilities */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.d-none { display: none; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-neon);
}
