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

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.2);
    --accent: #ffffff;
    --accent-hover: #f4f4f5;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.01) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 64px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin-bottom: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    backdrop-filter: blur(20px);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--text-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--bg-primary);
}

.header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.nav-container {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.nav-tabs {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 6px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px var(--shadow);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-tab.active {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

.nav-icon {
    font-size: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 12px 48px var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.9);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: rgba(59, 130, 246, 0.9);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--text-tertiary);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
    }
    100% {
        transform: translateY(-100px) translateX(100px);
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 24px;
    }
}

/* Page transition classes for smooth SPA navigation */
.page {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.page.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    position: relative;
    z-index: 2;
}

.page.page-transition-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    z-index: 3;
}

/* Fade-out animation for outgoing page */
.page.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for incoming page */
.page.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

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

/* Loading state for smooth transitions */
.page-container {
    position: relative;
    min-height: 60vh;
}

.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(2px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-card.active {
    border: 3px solid var(--success);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
    background: rgba(16,185,129,0.08);
    transition: border 0.3s, box-shadow 0.3s, background 0.3s;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .nav-tabs {
        flex-direction: column;
        width: 100%;
    }

    .nav-tab {
        justify-content: center;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .page {
        transform: translateY(10px);
    }

    .page.fade-out {
        transform: translateY(-5px);
    }

    .page.fade-in {
        transform: translateY(10px);
    }
}

/* Neater, grouped, and consistent button styles for the educational content hub */

.learning-hub-btn {
    display: inline-block;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 16px;
    margin-bottom: 0;
    text-align: center;
    outline: none;
    color: #18181b !important;      /* Black text */
    text-decoration: none !important; /* No underline */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: 
        background 0.2s,
        box-shadow 0.2s,
        color 0.2s,
        transform 0.2s;
}

/* Color variants */
.learning-hub-btn.ai {
    background: #2563eb;
}
.learning-hub-btn.mil {
    background: #10b981;
}
.learning-hub-btn.prompt {
    background: #fbbf24;
}

/* Hover/focus effects (shared) */
.learning-hub-btn:hover,
.learning-hub-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.15);
}

/* Individual hover backgrounds */
.learning-hub-btn.ai:hover,
.learning-hub-btn.ai:focus {
    background: #3b82f6;
}

.learning-hub-btn.mil:hover,
.learning-hub-btn.mil:focus {
    background: #34d399;
}

.learning-hub-btn.prompt:hover,
.learning-hub-btn.prompt:focus {
    background: #fde68a;
}
