/* ========================================
   MatMod - Design System & Styles
   Color Palette: Navy, Blue, Stone White
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
    --navy-900: #060D1A;
    --navy-800: #0A1628;
    --navy-700: #0F1F38;
    --navy-600: #152A4A;
    --navy-500: #1B2E4A;
    --blue-600: #1E3A6E;
    --blue-500: #2E5BBA;
    --blue-400: #4A8FE7;
    --blue-300: #6BA6F0;
    --blue-200: #9DC4F5;
    --blue-100: #C7DFFB;
    --stone-100: #F5F0EB;
    --stone-50: #FAF8F5;
    --white: #FFFFFF;
    --glass-bg: rgba(15, 31, 56, 0.6);
    --glass-border: rgba(74, 143, 231, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #2E5BBA, #4A8FE7);
    --gradient-hero: linear-gradient(160deg, #060D1A 0%, #0F1F38 40%, #152A4A 100%);
    --gradient-section: linear-gradient(180deg, #0A1628 0%, #0F1F38 100%);
    --gradient-text: linear-gradient(135deg, #4A8FE7, #6BA6F0, #9DC4F5);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px rgba(46, 91, 186, 0.2);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.35s ease;
    --transition-slow: 0.5s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background: var(--navy-800);
    color: var(--stone-100);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-medium);
    background: transparent;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo-highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--blue-200);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width var(--transition-medium);
}

.nav-links a:hover {
    color: var(--white);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding: 120px 24px 80px;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(74, 143, 231, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 143, 231, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(46, 91, 186, 0.15);
    border: 1px solid rgba(74, 143, 231, 0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-300);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--blue-200);
    max-width: 580px;
    line-height: 1.8;
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-medium);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(46, 91, 186, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(46, 91, 186, 0.6);
}

.btn-primary svg {
    transition: transform var(--transition-fast);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    background: rgba(74, 143, 231, 0.1);
    color: var(--blue-300);
    border: 1px solid rgba(74, 143, 231, 0.3);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(74, 143, 231, 0.2);
    border-color: rgba(74, 143, 231, 0.5);
    transform: translateY(-2px);
}

/* ---------- Hero Stats ---------- */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--blue-300);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(74, 143, 231, 0.2);
}

/* ---------- Floating Cards (Hero) ---------- */
.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 300px;
    height: 400px;
}

.floating-card {
    position: absolute;
    padding: 16px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--blue-100);
    animation-duration: 6s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.card-icon {
    font-size: 1.5rem;
}

.card-angle {
    top: 30px;
    right: 0;
    animation-name: float1;
}

.card-shape {
    top: 160px;
    right: 60px;
    animation-name: float2;
    animation-delay: 1s;
}

.card-3d {
    top: 290px;
    right: 10px;
    animation-name: float3;
    animation-delay: 2s;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(1.5deg); }
}

/* ---------- Section Common ---------- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(46, 91, 186, 0.12);
    border: 1px solid rgba(74, 143, 231, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--blue-200);
    line-height: 1.7;
}

/* ---------- About Section ---------- */
.about {
    background: var(--gradient-section);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.about-card {
    padding: 36px 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 143, 231, 0.3);
    box-shadow: var(--shadow-glow);
}


.about-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 91, 186, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--blue-400);
}

.about-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.about-card p {
    font-size: 0.9rem;
    color: var(--blue-200);
    line-height: 1.6;
}

/* ---------- Modules Section ---------- */
.modules {
    background: var(--navy-800);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.module-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 36px 30px 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--transition-medium);
    position: relative;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    transform: translateY(-6px);
    border-color: rgba(74, 143, 231, 0.35);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.module-status {
    margin-bottom: 20px;
}

.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.developing {
    background: rgba(34, 197, 94, 0.12);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-badge.planned {
    background: rgba(234, 179, 8, 0.12);
    color: #EAB308;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.module-icon-wrap {
    margin-bottom: 20px;
}

.module-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 91, 186, 0.12);
    border-radius: var(--radius-lg);
    color: var(--blue-400);
    transition: all var(--transition-medium);
}

.module-card:hover .module-icon {
    background: rgba(46, 91, 186, 0.2);
    transform: scale(1.05);
}

.module-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.module-desc {
    font-size: 0.9rem;
    color: var(--blue-200);
    line-height: 1.6;
    margin-bottom: 24px;
}

.module-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    flex: 1;
}

.module-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--blue-200);
}

.module-features svg {
    color: var(--blue-400);
    flex-shrink: 0;
}

.module-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(74, 143, 231, 0.1);
}

.module-tech {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--blue-400);
    font-weight: 500;
}

/* ---------- How it Works Section ---------- */
.how-it-works {
    background: var(--gradient-section);
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-card {
    flex: 0 0 200px;
    padding: 32px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    transition: all var(--transition-medium);
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 143, 231, 0.3);
    box-shadow: var(--shadow-glow);
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 16px;
}

.step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 91, 186, 0.15);
    border-radius: var(--radius-md);
    color: var(--blue-400);
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.82rem;
    color: var(--blue-200);
    line-height: 1.5;
}

.step-connector {
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-400);
    opacity: 0.4;
}

/* ---------- Technology Section ---------- */
.tech {
    background: var(--navy-800);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tech-card {
    padding: 36px 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    transition: all var(--transition-medium);
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 143, 231, 0.3);
    box-shadow: var(--shadow-glow);
}

.tech-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tech-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.tech-card p {
    font-size: 0.85rem;
    color: var(--blue-200);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tech-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 4px 12px;
    background: rgba(46, 91, 186, 0.1);
    border: 1px solid rgba(74, 143, 231, 0.15);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--blue-300);
}

/* ---------- Code Preview Section ---------- */
.code-preview {
    background: var(--gradient-section);
}

.code-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.code-info {
    padding-right: 20px;
}

.code-info .section-tag {
    margin-bottom: 16px;
}

.code-info .section-title {
    text-align: left;
    margin-bottom: 16px;
}

.code-info .section-desc {
    text-align: left;
}

.code-window {
    background: #0D1117;
    border: 1px solid rgba(74, 143, 231, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid rgba(74, 143, 231, 0.1);
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #FF5F57; }
.dot.yellow { background: #FEBC2E; }
.dot.green { background: #28C840; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--blue-300);
}

.code-block {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    color: #C9D1D9;
}

.code-keyword { color: #FF7B72; }
.code-module { color: #79C0FF; }
.code-comment { color: #8B949E; }
.code-param { color: #D2A8FF; }
.code-number { color: #79C0FF; }
.code-string { color: #A5D6FF; }
.code-fstring { color: #79C0FF; }
.code-builtin { color: #D2A8FF; }

/* ---------- Footer ---------- */
.footer {
    background: var(--navy-900);
    padding: 64px 0 0;
    border-top: 1px solid rgba(74, 143, 231, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--blue-200);
    line-height: 1.6;
    max-width: 300px;
}

.footer-links-group h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links-group ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-group a {
    font-size: 0.85rem;
    color: var(--blue-200);
    transition: color var(--transition-fast);
}

.footer-links-group a:hover {
    color: var(--blue-400);
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(74, 143, 231, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--blue-300);
}

.footer-credit {
    font-style: italic;
    opacity: 0.7;
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .code-content {
        grid-template-columns: 1fr;
    }

    .code-info {
        padding-right: 0;
    }

    .code-info .section-title,
    .code-info .section-desc {
        text-align: center;
    }

    .code-info .section-tag {
        display: block;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .steps-grid {
        flex-direction: column;
        gap: 16px;
    }

    .step-connector {
        transform: rotate(90deg);
    }

    .step-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(6, 13, 26, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        gap: 28px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .section {
        padding: 70px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        letter-spacing: -1px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stat-number {
        font-size: 1.6rem;
    }
}

/* ---------- Şekil Tanıma Interactive Section ---------- */
.sekil-tanima {
    background: var(--navy-800);
}

.sekil-tanima-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.drawing-panel, .results-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
}

.drawing-label h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 8px;
}

.drawing-hint {
    font-size: 0.9rem;
    color: var(--blue-200);
    display: block;
    margin-bottom: 24px;
}

.model-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--blue-300);
    padding: 10px 16px;
    background: rgba(46, 91, 186, 0.1);
    border-radius: var(--radius-md);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #EAB308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

.status-dot.loaded {
    background: #22C55E;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.error {
    background: #EF4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.canvas-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid rgba(74, 143, 231, 0.3);
    background: #000;
}

.canvas-grid-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.canvas-center-crosshair {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    pointer-events: none;
}
.canvas-center-crosshair::before {
    content: '';
    position: absolute;
    top: 50%; left: -10px; right: -10px; height: 2px;
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%);
}
.canvas-center-crosshair::after {
    content: '';
    position: absolute;
    left: 50%; top: -10px; bottom: -10px; width: 2px;
    background: rgba(255,255,255,0.2);
    transform: translateX(-50%);
}

.result-card {
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(74, 143, 231, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.result-card:last-child {
    margin-bottom: 0;
}

.result-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.result-card-header .icon {
    width: 40px; height: 40px;
    background: rgba(46, 91, 186, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-400);
}

.result-card-header h3 {
    font-size: 1.1rem;
    color: var(--white);
}

.prediction-main {
    text-align: center;
    padding: 30px;
    background: rgba(6, 13, 26, 0.6);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.prediction-placeholder {
    color: var(--blue-200);
    font-size: 0.95rem;
}

.predicted-shape-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    text-shadow: var(--shadow-glow);
}

.predicted-shape-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}

.predicted-confidence {
    font-size: 1rem;
    color: #22C55E;
    font-weight: 600;
}

.confidence-item {
    margin-bottom: 16px;
}

.confidence-item:last-child {
    margin-bottom: 0;
}

.confidence-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--blue-100);
}

.confidence-bar-track {
    height: 10px;
    background: rgba(74, 143, 231, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.confidence-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.confidence-bar-fill.kare { background: #EAB308; }
.confidence-bar-fill.daire { background: #EC4899; }
.confidence-bar-fill.ucgen { background: #3B82F6; }

.confidence-bar-fill.winner {
    box-shadow: 0 0 10px currentColor;
}

.preview-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

.preview-canvas-wrap {
    width: 60px; height: 60px;
    background: #000;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-canvas-wrap canvas {
    width: 28px; height: 28px;
    image-rendering: pixelated;
}

.preview-info {
    display: flex;
    flex-direction: column;
}

.preview-info .label {
    font-size: 0.8rem;
    color: var(--blue-300);
    text-transform: uppercase;
}

.preview-info .value {
    font-size: 0.95rem;
    color: var(--white);
    font-family: var(--font-mono);
}

.shape-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.shape-info-card {
    background: rgba(6, 13, 26, 0.6);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.shape-info-card:hover {
    border-color: rgba(74, 143, 231, 0.3);
    transform: translateY(-2px);
}

.shape-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.shape-name-label {
    font-weight: 700;
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.shape-sides {
    font-size: 0.8rem;
    color: var(--blue-300);
}

@media (max-width: 1024px) {
    .sekil-tanima-content {
        grid-template-columns: 1fr;
    }
}

/* --- New Dashboard Styles --- */
.game-dashboard {
    display: flex;
    justify-content: space-between;
    background: rgba(46, 91, 186, 0.15);
    border: 1px solid rgba(74, 143, 231, 0.3);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.dashboard-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--blue-200);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.highlight-gold {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.highlight-green {
    color: #00FF7F;
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.4);
}

.status-dashboard {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background: rgba(6, 13, 26, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue-400);
    box-shadow: 0 0 10px var(--blue-400);
    transition: background 0.3s ease;
}

.status-indicator.active {
    background: #00FF7F;
    box-shadow: 0 0 15px #00FF7F;
    animation: pulse-dot 1.5s infinite;
}

.status-indicator.processing {
    background: #FFD700;
    box-shadow: 0 0 15px #FFD700;
    animation: pulse-dot 0.8s infinite;
}

.status-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--blue-100);
}

.canvas-wrapper {
    transition: all 0.3s ease;
}

.canvas-wrapper.drawing-active {
    border-color: #00FF7F;
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.2);
}

/* --- Layout Enhancements --- */
.sekil-tanima-content {
    align-items: stretch !important;
}

.drawing-panel, .results-panel {
    display: flex;
    flex-direction: column;
}

.results-panel .result-card {
    display: flex;
    flex-direction: column;
}

.results-panel .result-card:first-child {
    flex: 1; /* İlk kartı olabildiğince büyütüp sol tarafla hizalar */
}

.prediction-main {
    flex: 1; /* Tahmin kutusunu ortalar */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.canvas-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
}
#videoElement, #drawingCanvas, #cameraOverlay {
    height: 100% !important;
    object-fit: contain;
}