/* ============================================================
   IKAssist — Premium CSS Design System v3
   Dark/Light theme · Preloader · Custom cursor · Toasts · FAQ
   ============================================================ */

:root,
[data-theme="light"] {
    --primary: #22C55E;
    --primary-dark: #16A34A;
    --primary-glow: rgba(34, 197, 94, 0.35);
    --accent: #A78BFA;
    --accent-glow: rgba(167, 139, 250, 0.3);
    --yellow: #FACC15;
    --yellow-glow: rgba(250, 204, 21, 0.25);
    --danger: #EF4444;
    --dark: #0F172A;
    --dark-2: #1E293B;
    --text: #334155;
    --text-light: #94A3B8;
    --text-faint: #CBD5E1;
    --bg: #F8FAFC;
    --bg-2: #F1F5F9;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --input-bg: rgba(255, 255, 255, 0.8);
    --card-hover-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --grid-color: rgba(0, 0, 0, 0.025);
    --video-bg: #0F172A;
    --footer-bg: #0F172A;
    --footer-text: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] {
    --dark: #F1F5F9;
    --dark-2: #E2E8F0;
    --text: #CBD5E1;
    --text-light: #94A3B8;
    --text-faint: #475569;
    --bg: #0F172A;
    --bg-2: #1E293B;
    --white: #1E293B;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(51, 65, 85, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --input-bg: rgba(30, 41, 59, 0.9);
    --card-hover-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --grid-color: rgba(255, 255, 255, 0.03);
    --video-bg: #020617;
    --footer-bg: #020617;
    --footer-text: rgba(255, 255, 255, 0.5);
    --primary-glow: rgba(34, 197, 94, 0.2);
}

:root {
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 30px var(--primary-glow);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background .4s, color .4s
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.15;
    transition: color .4s
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    height: auto
}

button {
    font-family: inherit
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity .6s, visibility .6s
}

.preloader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none
}

.preloader-inner {
    position: relative;
    width: 120px;
    height: 120px
}

.preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent
}

.preloader-ring:nth-child(1) {
    border-top-color: var(--primary);
    animation: pre-spin 1.2s linear infinite
}

.preloader-ring:nth-child(2) {
    inset: 10px;
    border-right-color: var(--accent);
    animation: pre-spin 1.6s linear infinite reverse
}

.preloader-ring:nth-child(3) {
    inset: 20px;
    border-bottom-color: var(--yellow);
    animation: pre-spin 2s linear infinite
}

@keyframes pre-spin {
    to {
        transform: rotate(360deg)
    }
}

.preloader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain
}

.preloader-text {
    margin-top: 24px;
    font-family: 'Outfit';
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--dark);
    animation: pre-pulse 1.5s ease infinite
}

@keyframes pre-pulse {

    0%,
    100% {
        opacity: .4
    }

    50% {
        opacity: 1
    }
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    z-index: 10000;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width .2s, height .2s, background .2s
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width .25s, height .25s, border-color .25s, background .25s;
    opacity: .5
}

.cursor-dot.hover {
    width: 10px;
    height: 10px;
    background: var(--accent)
}

.cursor-ring.hover {
    width: 48px;
    height: 48px;
    border-color: var(--accent);
    background: rgba(167, 139, 250, .08)
}

@media(max-width:768px) {

    .cursor-dot,
    .cursor-ring {
        display: none
    }
}

/* ===== PARTICLES ===== */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none
}

/* ===== TOASTS ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px
}

.toast {
    padding: 14px 20px;
    border-radius: var(--r-md);
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toast-in .4s ease;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px
}

.toast.success {
    background: var(--primary);
    color: #fff
}

.toast.error {
    background: var(--danger);
    color: #fff
}

.toast.info {
    background: var(--accent);
    color: #fff
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(40px) scale(.95)
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1)
    }
}

.toast.toast-out {
    animation: toast-out .3s ease forwards
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(40px) scale(.95)
    }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 7000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .3s;
    color: var(--text)
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.back-to-top:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-glow)
}

/* ===== GLASSMORPHISM ===== */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: background .4s, border-color .4s
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    transition: all .3s;
    background: rgba(248, 250, 252, .75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, .04)
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, .8);
    border-bottom-color: rgba(255, 255, 255, .04)
}

.navbar.scrolled {
    box-shadow: var(--shadow-md)
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none
}

.mascot-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    transition: transform .3s, background .4s
}

.mascot-wrapper:hover {
    transform: scale(1.1) rotate(-5deg)
}

#mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.brand h1 {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.5px
}

.brand p {
    font-size: .75rem;
    color: var(--text-light);
    font-weight: 500
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px
}

.nav-link {
    padding: 8px 14px;
    font-weight: 500;
    font-size: .88rem;
    color: var(--text);
    border-radius: var(--r-sm);
    transition: all .2s
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(34, 197, 94, .06)
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: .3s
}

/* Theme toggle */
.theme-toggle {
    position: relative
}

.icon-sun,
.icon-moon {
    transition: opacity .3s, transform .3s
}

[data-theme="light"] .icon-moon {
    display: none
}

[data-theme="dark"] .icon-sun {
    display: none
}

/* Lang toggle */
.lang-toggle {
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .5px;
    min-width: 40px
}

/* User chip / dropdown */
.nav-user {
    position: relative
}

.nav-user.hidden {
    display: none
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--glass-border);
    border-radius: var(--r-full);
    background: var(--glass-bg);
    cursor: pointer;
    transition: all .2s;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text)
}

.user-chip:hover {
    border-color: var(--primary)
}

.user-chip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .85rem
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    border-radius: var(--r-md);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .2s;
    z-index: 100
}

.nav-user.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    transition: background .15s
}

.dropdown-item:hover {
    background: rgba(34, 197, 94, .06)
}

.dropdown-item.danger {
    color: var(--danger)
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, .06)
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 4px 0
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    padding: 10px 20px;
    border-radius: var(--r-sm);
    border: none;
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
    white-space: nowrap;
    color: var(--text)
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none
}

.btn-primary {
    background: var(--primary);
    color: #fff
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow)
}

.btn-glow {
    box-shadow: 0 4px 20px var(--primary-glow)
}

.btn-accent {
    background: var(--accent);
    color: #fff
}

.btn-accent:hover {
    background: #8B5CF6;
    transform: translateY(-2px)
}

.btn-ghost {
    background: transparent
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, .04)
}

[data-theme="dark"] .btn-ghost:hover {
    background: rgba(255, 255, 255, .06)
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px)
}

.btn-glass:hover {
    transform: translateY(-2px)
}

.btn-glass.danger {
    color: var(--danger)
}

.btn-glass.danger:hover {
    background: var(--danger);
    color: #fff
}

.btn-sm {
    padding: 6px 14px;
    font-size: .82rem
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--r-md)
}

.btn-full {
    width: 100%
}

.btn-icon {
    padding: 10px
}

.btn-icon-only {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text);
    border-radius: var(--r-sm)
}

.btn-icon-only:hover {
    background: rgba(0, 0, 0, .06)
}

[data-theme="dark"] .btn-icon-only:hover {
    background: rgba(255, 255, 255, .06)
}

/* ===== HERO ===== */
.hero-section {
    padding: 140px 0 80px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--r-full);
    font-size: .82rem;
    font-weight: 600;
    background: rgba(34, 197, 94, .08);
    color: var(--primary)
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: badge-pulse 2s infinite
}

@keyframes badge-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .5;
        transform: scale(.8)
    }
}

.pulse-badge {
    margin-bottom: 24px
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 20px
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #059669, var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7
}

.hero-subtitle strong {
    color: var(--text)
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 20px
}

.stat {
    text-align: center
}

.stat-num {
    display: block;
    font-family: 'Outfit';
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark)
}

.stat-label {
    font-size: .8rem;
    color: var(--text-light)
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--text-faint)
}

.shortcuts-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: var(--text-light)
}

kbd {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .75rem;
    font-family: 'Inter', monospace;
    font-weight: 600;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text)
}

.hero-visual {
    display: flex;
    justify-content: center
}

.hero-card {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center
}

.hero-card-inner {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, .1), rgba(167, 139, 250, .1));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1
}

.hero-mascot {
    width: 200px;
    height: 200px;
    object-fit: contain
}

.hero-card-glow {
    position: absolute;
    inset: -20px;
    border-radius: var(--r-xl);
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    z-index: 0;
    filter: blur(30px);
    animation: hero-glow 4s ease-in-out infinite
}

@keyframes hero-glow {

    0%,
    100% {
        opacity: .4;
        transform: scale(1)
    }

    50% {
        opacity: .7;
        transform: scale(1.05)
    }
}

.floating {
    animation: float 6s ease-in-out infinite
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-16px)
    }
}

.scroll-indicator {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    animation: fade-in-up 1s ease 1s both
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-faint);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px
}

.wheel {
    width: 4px;
    height: 10px;
    border-radius: 2px;
    background: var(--primary);
    animation: scroll-wheel 2s ease infinite
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translateY(0)
    }

    100% {
        opacity: 0;
        transform: translateY(12px)
    }
}

/* ===== ABOUT ===== */
.about-section {
    padding: 100px 0
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin: 16px 0
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px
}

.about-card {
    padding: 36px 28px;
    border-radius: var(--r-lg);
    text-align: center;
    transition: transform .3s, box-shadow .3s
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow)
}

.about-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--r-md);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(167, 139, 250, .1);
    color: var(--accent);
    transition: transform .3s
}

.about-icon.icon-green {
    background: rgba(34, 197, 94, .1);
    color: var(--primary)
}

.about-icon.icon-yellow {
    background: rgba(250, 204, 21, .15);
    color: #D97706
}

.anim-icon:hover {
    transform: scale(1.15) rotate(-5deg)
}

.about-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px
}

.about-card p {
    font-size: .92rem;
    color: var(--text-light);
    line-height: 1.6
}

/* ===== APP / TRANSLATOR ===== */
.app-section {
    padding: 80px 0 100px
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px
}

.panel {
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    display: flex;
    justify-content: space-between;
    align-items: center
}

[data-theme="dark"] .panel-header {
    border-bottom-color: rgba(255, 255, 255, .05)
}

.panel-header h3 {
    font-size: .95rem;
    font-weight: 700
}

.panel-header-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: .88rem
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-faint);
    transition: all .3s
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    animation: pulse-dot 2s infinite
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.3)
    }
}

/* Session timer */
.session-timer {
    font-family: 'Outfit', monospace;
    font-weight: 700;
    font-size: .9rem;
    color: var(--primary);
    background: rgba(34, 197, 94, .08);
    padding: 4px 12px;
    border-radius: var(--r-full);
    letter-spacing: 1px
}

.session-timer.hidden {
    display: none
}

.video-container {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--video-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

#camera-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transform: scaleX(-1)
}

.camera-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, .5);
    padding: 24px
}

.placeholder-anim {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center
}

.ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .1)
}

.ring-1 {
    animation: ring-expand 3s ease-in-out infinite
}

.ring-2 {
    animation: ring-expand 3s ease-in-out 1s infinite
}

.ring-3 {
    animation: ring-expand 3s ease-in-out 2s infinite
}

@keyframes ring-expand {
    0% {
        transform: scale(.6);
        opacity: 1
    }

    100% {
        transform: scale(1.6);
        opacity: 0
    }
}

.scanning-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 20px 4px var(--primary-glow);
    display: none;
    z-index: 10
}

.scanning-effect.active {
    display: block;
    animation: scan 2.5s linear infinite
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0
    }

    5% {
        opacity: 1
    }

    95% {
        opacity: 1
    }

    100% {
        top: 100%;
        opacity: 0
    }
}

.scan-corners {
    position: absolute;
    inset: 16px;
    z-index: 5;
    display: none
}

.scan-corners.active {
    display: block
}

.corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0
}

.corner.tl {
    top: 0;
    left: 0;
    border-top-width: 3px;
    border-left-width: 3px;
    border-radius: 4px 0 0 0
}

.corner.tr {
    top: 0;
    right: 0;
    border-top-width: 3px;
    border-right-width: 3px;
    border-radius: 0 4px 0 0
}

.corner.bl {
    bottom: 0;
    left: 0;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-radius: 0 0 0 4px
}

.corner.br {
    bottom: 0;
    right: 0;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-radius: 0 0 4px 0
}

.translating-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--primary);
    font-weight: 600;
    opacity: 0;
    transition: opacity .3s
}

.translating-status.active {
    opacity: 1
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(34, 197, 94, .2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin .8s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.translation-result {
    flex: 1;
    padding: 20px;
    min-height: 250px;
    max-height: 350px;
    overflow-y: auto;
    background: var(--white);
    transition: background .4s
}

.text-output {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.65
}

.placeholder-text {
    color: var(--text-faint);
    font-style: italic;
    font-weight: 400
}

.panel-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(0, 0, 0, .04);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

[data-theme="dark"] .panel-footer {
    border-top-color: rgba(255, 255, 255, .04)
}

.tts-controls {
    display: flex;
    gap: 16px;
    flex: 1;
    align-items: center
}

.range-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-light);
    white-space: nowrap
}

.range-label input[type="range"] {
    width: 80px;
    accent-color: var(--primary)
}

.range-label span:last-child {
    width: 28px;
    text-align: center;
    font-weight: 600;
    color: var(--text)
}

.action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px
}

.ws-status {
    font-size: .82rem;
    color: var(--text-light);
    font-weight: 500
}

/* ===== FEATURES ===== */
.features-section {
    padding: 80px 0 120px
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px
}

.feature-card {
    padding: 32px 28px;
    border-radius: var(--r-lg);
    transition: transform .3s, box-shadow .3s;
    position: relative;
    overflow: hidden
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow)
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity .3s
}

.feature-card:hover::before {
    opacity: 1
}

.feature-num {
    font-family: 'Outfit';
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(34, 197, 94, .1);
    line-height: 1;
    margin-bottom: 12px
}

[data-theme="dark"] .feature-num {
    color: rgba(34, 197, 94, .2)
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px
}

.feature-card p {
    font-size: .88rem;
    color: var(--text-light);
    line-height: 1.6
}

/* ===== FAQ ===== */
.faq-section {
    padding: 80px 0
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.faq-item {
    border-radius: var(--r-md);
    overflow: hidden;
    transition: box-shadow .3s
}

.faq-item:hover {
    box-shadow: var(--card-hover-shadow)
}

.faq-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    border: none;
    background: none;
    font-size: .95rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    text-align: left;
    transition: color .2s
}

.faq-trigger:hover {
    color: var(--primary)
}

.faq-trigger::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-light);
    transition: transform .3s
}

.faq-item.open .faq-trigger::after {
    transform: rotate(45deg);
    color: var(--primary)
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .4s ease
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 18px
}

.faq-answer p {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.65
}

/* ===== CONTACT ===== */
.contact-section {
    padding: 60px 0 100px
}

.contact-form {
    max-width: 620px;
    margin: 0 auto;
    padding: 36px;
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    gap: 18px
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.contact-form textarea {
    padding: 12px 16px;
    border: 1.5px solid rgba(0, 0, 0, .1);
    border-radius: var(--r-sm);
    font-size: .95rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: var(--input-bg);
    color: var(--text)
}

[data-theme="dark"] .contact-form textarea {
    border-color: rgba(255, 255, 255, .1)
}

.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px
}

.modal-overlay.open {
    display: flex
}

.modal {
    width: 100%;
    max-width: 420px;
    border-radius: var(--r-lg);
    padding: 36px;
    position: relative;
    animation: modal-in .35s ease
}

.modal-wide {
    max-width: 600px
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.97)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s
}

.modal-close:hover {
    background: rgba(0, 0, 0, .06);
    color: var(--dark)
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px
}

.modal-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}

.modal-title-bar .modal-title {
    margin-bottom: 0
}

.modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: rgba(0, 0, 0, .04);
    border-radius: var(--r-sm);
    padding: 4px
}

[data-theme="dark"] .modal-tabs {
    background: rgba(255, 255, 255, .04)
}

.tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-light);
    border-radius: var(--r-xs);
    cursor: pointer;
    transition: all .2s
}

.tab.active {
    background: var(--white);
    color: var(--dark);
    box-shadow: var(--shadow-sm)
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.auth-form.hidden {
    display: none
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.input-group label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--dark)
}

.input-group input {
    padding: 12px 16px;
    border: 1.5px solid rgba(0, 0, 0, .1);
    border-radius: var(--r-sm);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: var(--input-bg);
    color: var(--text)
}

[data-theme="dark"] .input-group input {
    border-color: rgba(255, 255, 255, .1)
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

.form-error {
    font-size: .85rem;
    color: var(--danger);
    min-height: 20px
}

.history-list {
    max-height: 400px;
    overflow-y: auto
}

.history-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start
}

.history-item:last-child {
    border-bottom: none
}

.history-text {
    flex: 1;
    font-size: .92rem;
    color: var(--text);
    line-height: 1.5
}

.history-meta {
    font-size: .78rem;
    color: var(--text-light);
    white-space: nowrap
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.mini-stat {
    padding: 20px;
    border-radius: var(--r-md);
    text-align: center
}

.mini-stat-num {
    display: block;
    font-family: 'Outfit';
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px
}

.mini-stat-label {
    font-size: .82rem;
    color: var(--text-light)
}

/* ===== FOOTER ===== */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 48px 0;
    transition: background .4s
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.footer-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%
}

.footer-brand p {
    color: rgba(255, 255, 255, .8);
    font-weight: 600;
    font-size: .9rem
}

.footer-desc {
    font-size: .85rem
}

.footer-links .btn {
    color: var(--footer-text)
}

.footer-links .btn:hover {
    color: #fff
}

/* ===== REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0)
}

.reveal-delay-1 {
    transition-delay: .15s
}

.reveal-delay-2 {
    transition-delay: .3s
}

/* ===== PARALLAX ===== */
.parallax-section {
    will-change: transform
}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center
    }

    .hero-actions {
        justify-content: center
    }

    .hero-stats {
        justify-content: center
    }

    .shortcuts-hint {
        justify-content: center
    }

    .hero-visual {
        order: -1
    }

    .hero-card {
        width: 260px;
        height: 260px
    }

    .hero-card-inner {
        width: 200px;
        height: 200px
    }

    .hero-mascot {
        width: 150px;
        height: 150px
    }
}

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

    .about-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto
    }

    .contact-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:768px) {
    .nav-links {
        display: none
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 16px 24px;
        gap: 8px;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid rgba(0, 0, 0, .06)
    }

    .hamburger {
        display: flex
    }

    .hero-title {
        font-size: 2.2rem
    }

    .stats-grid {
        grid-template-columns: 1fr
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.hidden {
    display: none !important
}
/* ============================================================
   ML STUDIO
   ============================================================ */
.modal-studio {
    max-width: 1100px !important;
    width: calc(100vw - 40px);
    padding: 24px !important;
}
.studio-tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding-bottom: 0;
}
.studio-tab {
    background: none;
    border: none;
    color: var(--text-light);
    font-family: inherit;
    font-weight: 600;
    font-size: .92rem;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
    transition: color .2s;
    border-radius: 8px 8px 0 0;
}
.studio-tab:hover { color: var(--text); }
.studio-tab.active { color: var(--primary); }
.studio-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 12px; right: 12px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}
.studio-pane { display: none; animation: fadeIn .3s ease; }
.studio-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Collect tab */
.studio-collect-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}
.studio-video-wrap {
    position: relative;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
}
#studio-video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
#studio-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    transition: box-shadow .2s;
}
.studio-hud {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(6px);
    color: #22C55E;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    line-height: 1.55;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, .4);
    letter-spacing: .5px;
    pointer-events: none;
}
#studio-rec-progress {
    position: absolute;
    bottom: 12px; left: 12px; right: 12px;
    background: rgba(34, 197, 94, .85);
    color: #fff;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
}
#studio-rec-progress:empty { display: none; }

.studio-controls { display: flex; flex-direction: column; gap: 14px; }
.studio-controls .input-group { margin: 0; }
.studio-counter {
    font-size: .85rem;
    color: var(--text-light);
    padding: 8px 12px;
    background: rgba(34, 197, 94, .08);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}
.studio-dataset {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}
.ds-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background .15s;
}
.ds-row:hover { background: rgba(255, 255, 255, .04); }
.ds-label { font-weight: 600; flex: 1; }
.ds-count { font-size: .85rem; color: var(--text-light); font-family: ui-monospace, monospace; }
.ds-count small { opacity: .7; }
.ds-del {
    background: none;
    border: none;
    color: #EF4444;
    font-size: 1.4rem;
    cursor: pointer;
    width: 28px; height: 28px;
    border-radius: 50%;
    transition: background .2s;
    line-height: 1;
}
.ds-del:hover { background: rgba(239, 68, 68, .15); }
.studio-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Train tab */
.studio-train-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.studio-hparams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.studio-hparams label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .85rem;
    color: var(--text-light);
}
.studio-hparams input[type=range] { accent-color: var(--primary); }
.hp-val {
    display: inline-block;
    margin-left: 8px;
    font-family: ui-monospace, monospace;
    color: var(--text);
    font-weight: 600;
}
#studio-loss-chart {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, .35);
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
}
.studio-train-log {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, .25);
    border-radius: 8px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: .85rem;
    line-height: 1.6;
    min-height: 60px;
    color: var(--text);
}
.studio-train-log:empty::before {
    content: 'Здесь появится прогресс обучения...';
    color: var(--text-light);
    opacity: .5;
}

/* Model tab */
.studio-model-info { margin-bottom: 16px; }
.model-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: .9rem;
}
.model-info-row span { color: var(--text-light); }
.model-info-row b { color: var(--text); text-align: right; word-break: break-word; }
.studio-model-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.studio-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(34, 197, 94, .08);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
}
.studio-toggle input[type=checkbox] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Studio button in nav */
.studio-nav-btn {
    background: linear-gradient(135deg, var(--primary), #A78BFA);
    color: #fff !important;
    font-weight: 600;
}
.studio-nav-btn:hover { transform: translateY(-1px); }

/* Mobile */
@media (max-width: 800px) {
    .studio-collect-grid { grid-template-columns: 1fr; }
    .studio-train-info { grid-template-columns: 1fr; }
    .studio-hparams { grid-template-columns: 1fr; }
    .modal-studio { padding: 16px !important; max-height: 92vh; overflow-y: auto; }
}
