/* Roots & Variables */
:root {
    --bg-dark: #050507;
    --bg-card: #0f1014;
    --primary: #8b5cf6;
    /* Violet */
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #3b82f6;
    /* Blue */
    --secondary-glow: rgba(59, 130, 246, 0.5);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    /* Boosted Purple Tint */
    --surface-glass: linear-gradient(135deg, rgba(50, 40, 80, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    --bg-card-hover: rgba(60, 50, 100, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

code,
pre {
    font-family: 'JetBrains Mono', monospace;
}

/* Utilities */
.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-glass);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.btn-primary-outline {
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-primary-outline:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    filter: blur(100px);
    opacity: 0.2;
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Hero Text */
.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.badge-new {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary);
    color: #c4b5fd;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stats-row {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Animation Container */
.hero-visual {
    position: relative;
    height: 500px;
    width: 100%;
    perspective: 1000px;
}

.simulation-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    right: -10%;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: 0%;
    left: 10%;
}

.code-card {
    position: absolute;
    top: 10%;
    left: 0;
    width: 45%;
    height: 60%;
    border-radius: 12px;
    transform: rotateY(5deg) translateZ(20px);
    transition: transform 0.5s ease;
}

.teacher-view-container {
    position: absolute;
    top: 30%;
    right: 0;
    width: 50%;
    height: 65%;
    border-radius: 12px;
    transform: rotateY(-5deg) translateZ(0px);
    background: #0d0e12;
}

.card-header,
.teacher-header {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px 12px 0 0;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-tab {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.live-indicator {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.card-body {
    padding: 1rem;
    font-size: 0.9rem;
    color: #a5b3ce;
    overflow: hidden;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--secondary);
    animation: blink 1s infinite;
    vertical-align: middle;
}

.grid-monitor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    height: calc(100% - 40px);
}

.mini-monitor {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 0.5rem;
    overflow: hidden;
}

.mini-header {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.mini-code {
    font-size: 0.4rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.2;
    white-space: pre-wrap;
    font-family: monospace;
}

.active-sync {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.error-state {
    border-color: #ef4444;
}

.connection-beam {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
}

/* Syntax Highlighting Mock */
.keyword {
    color: #c678dd;
}

.func {
    color: #61afef;
}

.string {
    color: #98c379;
}

.comment {
    color: #5c6370;
}

.bool {
    color: #d19a66;
}

/* Sections */
section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-box.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.icon-box.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

.icon-box.pink {
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
}

/* Text Icons (No Box) */
.icon-text {
    width: 24px;
    height: 24px;
}

.icon-text.purple {
    color: #a78bfa;
}

.icon-text.blue {
    color: #60a5fa;
}

.icon-text.green {
    color: #34d399;
}

.icon-text.pink {
    color: #f472b6;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Showcase Sections */
.section-showcase {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 2rem;
}

.section-showcase.reverse {
    flex-direction: row-reverse;
}

.showcase-visual {
    flex: 1;
    height: 350px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.showcase-content {
    flex: 1;
}

.showcase-content h2 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.feature-list i {
    color: var(--primary);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin-top: 2rem;
}

.bento-card {
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-5px);
}

.bento-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bento-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Grid Spans */
.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card.wide {
    grid-column: span 2;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    margin-bottom: 0;
    /* Remove margin as it's handled by wrapper */
}

/* Time Travel Video Player */
.time-travel-player {
    width: 100%;
    margin-top: 1rem;
    background: #000;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tt-screen {
    height: 120px;
    padding: 1rem;
    position: relative;
    background: #0d0e12;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    border-bottom: 1px solid #1f2937;
}

.tt-code-layer {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tt-code-layer .line {
    display: block;
}

.tt-code-layer .new {
    color: var(--secondary);
}

.tt-overlay-replay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.6rem;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.tt-overlay-replay i {
    width: 10px;
    height: 10px;
}

.tt-controls {
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #111827;
}

.tt-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.control-icon {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.control-icon:hover {
    color: white;
}

.control-icon.active {
    color: white;
    fill: white;
}

.tt-timeline {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tt-track {
    flex: 1;
    height: 4px;
    background: #374151;
    border-radius: 99px;
    position: relative;
    cursor: pointer;
}

.tt-progress {
    width: 65%;
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    position: absolute;
}

.tt-thumb {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 65%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    cursor: grab;
    transition: left 2s linear;
    /* Smooth automated movement for visual */
    animation: timeline-scrub 4s infinite ease-in-out alternate;
}

/* Sync text typing opacity with scrub */
.tt-code-layer .typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--secondary);
    width: 0;
    animation: typing-simulation 4s infinite ease-in-out alternate;
}

.tt-time {
    font-size: 0.7rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

@keyframes timeline-scrub {
    0% {
        left: 40%;
    }

    100% {
        left: 85%;
    }
}

@keyframes typing-simulation {
    0% {
        width: 0;
        opacity: 0.5;
    }

    40% {
        width: 0;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 1;
    }
}

/* Special Card Styles */
.badge-feature {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--primary);
}

.mini-visual-list {
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mini-visual-list span {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: #e2e8f0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.mini-visual-list i {
    width: 16px;
    height: 16px;
    color: var(--secondary);
}

/* Exam Mockup */
.exam-ui-mockup {
    width: 90%;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1e293b;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.exam-header {
    background: #1e293b;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: bold;
    color: #94a3b8;
}

.exam-timer.error {
    color: #f43f5e;
    animation: pulse 1s infinite;
}

.exam-body {
    display: flex;
    height: 180px;
}

.pdf-viewer {
    width: 40%;
    background: #334155;
    margin: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 0.8rem;
}

.editor-placeholder {
    flex: 1;
    padding: 1rem;
    font-family: monospace;
    color: #e2e8f0;
    font-size: 0.8rem;
}

.focus-alert {
    background: rgba(244, 63, 94, 0.9);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Workshop Mockup */
.workshop-ui-mockup {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursors-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.cursor-mock {
    position: absolute;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #000;
    font-weight: bold;
}

.cursor-mock.c1 {
    top: 40%;
    left: 30%;
    background: #facc15;
}

.cursor-mock.c2 {
    top: 60%;
    right: 30%;
    background: #4ade80;
}

.code-layer {
    font-family: monospace;
    color: #94a3b8;
    font-size: 1.2rem;
}

.c1-bg {
    background: rgba(250, 204, 21, 0.2);
}

.c2-bg {
    background: rgba(74, 222, 128, 0.2);
}

/* Management Grid */
.features-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-card.small {
    padding: 1.5rem;
    align-items: flex-start;
}

.feature-card.small h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.icon-inline {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-cta {
    margin-bottom: 3rem;
}

.footer-cta h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.socials {
    display: flex;
    gap: 1rem;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Media Queries */
@media (max-width: 900px) {

    /* Responsive Navigation */
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
        /* Reduce font size preventing cutoff */
        line-height: 1.2;
    }

    .hero-text p {
        margin: 0 auto 2rem;
        font-size: 1rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 0.8rem;
    }

    .badge-feature {
        position: relative;
        /* un-stick from corner */
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0.5rem;
    }

    .stats-row {
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-visual {
        display: none;
    }

    /* Mockups scaling */
    .game-ui-mockup,
    .chat-mockup,
    .exam-ui-mockup,
    .workshop-ui-mockup,
    .time-travel-player {
        width: 100% !important;
        max-width: 100%;
        font-size: 0.75rem;
        /* Scale down text inside mockups */
    }

    .tt-screen {
        height: auto;
    }

    .section-showcase {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .section-showcase.reverse {
        flex-direction: column;
    }

    .showcase-visual {
        width: 100%;
        height: auto;
        min-height: 250px;
        padding: 1rem;
    }

    .feature-list {
        text-align: left;
        opacity: 0.8;
    }

    /* Bento Responsive */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bento-card.large,
    .bento-card.wide {
        grid-column: span 1;
        grid-row: auto;
    }

    .bento-card {
        min-height: auto;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}