/* WebFX Motion - Modern Minimalist Design */

/* Reset & Variables */
:root {
    /* Palette */
    --primary: #ef4444;
    /* WebFX Red */
    --primary-hover: #dc2626;
    --accent: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    /* Glassmorphism Variables (Global) */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --card-bg: #ffffff;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(239, 68, 68, 0.15), 0 4px 6px -2px rgba(239, 68, 68, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-full: 9999px;
    --container-width: 1200px;
    --header-height: 70px;

    /* Animation */
    --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dark-mode {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;

    /* Dark Mode Glassmorphism */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-bg: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

p {
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

/* Navigation */
.motion-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon,
.theme-toggle,
.lang-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle {
    font-weight: 700;
    font-size: 0.875rem;
}

.nav-icon:hover,
.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.nav-login-btn {
    padding: 8px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.nav-login-btn:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Register Button */
.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    margin-right: 1rem;
}

.btn-register:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    margin: 5px auto;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
    }

    .btn-register {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }

    .btn-register span {
        display: none;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }

    .nav-left {
        gap: 20px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-md);
    border: none;
}

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

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-surface);
    border-color: var(--text-muted);
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 160px 0 120px;
    /* Slightly reduced top padding, increased bottom */
    position: relative;
    overflow: hidden;
    /* Subtle mesh gradient background to fill emptiness */
    background:
        radial-gradient(circle at 15% 50%, rgba(239, 68, 68, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 25%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero .container {
    position: relative;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    /* Ensure content is vertically balanced */
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 650px;
    /* Slightly wider */
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    /* Larger badge */
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 40px;
    /* More space below badge */
    box-shadow: var(--shadow-sm);
}

.hero-badge span.new {
    background: var(--primary);
    /* Red background for NEW */
    color: white;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 99px;
    margin-right: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    /* Larger title */
    margin-bottom: 32px;
    color: var(--text-main);
    line-height: 1.05;
    /* Tighter line height */
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: 1.35rem;
    /* Larger description */
    color: var(--text-muted);
    margin-bottom: 56px;
    max-width: 580px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 20px;
    /* More gap */
}

/* Hero Visual Premium Redesign */
.hero-visual {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 42%;
    /* Reduced further to 42% */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    perspective: 1200px;
    pointer-events: none;
}

.hero-showcase-container {
    position: relative;
    width: 550px;
    /* Reduced from 600px for better proportion */
    height: 550px;
    transform-style: preserve-3d;
    animation: hero-float-container 10s ease-in-out infinite;
    margin-left: 80px;
    /* Increased margin to 80px */
}

/* Common Item Styles */
.hero-showcase-item {
    position: absolute;
    transform-style: preserve-3d;
}

/* 1. Glass Terminal (Code) */
.item-code {
    top: 20%;
    left: 20px;
    z-index: 2;
    transform: translateZ(40px) rotateY(-15deg) rotateX(5deg);
}

.glass-terminal {
    width: 380px;
    /* Light Mode Default */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease;
    animation: terminal-hover 6s ease-in-out infinite;
}

.dark-mode .glass-terminal {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .terminal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-controls span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
}

.dark-mode .terminal-controls span {
    background: rgba(255, 255, 255, 0.2);
}

.terminal-controls span:nth-child(1) {
    background: #ef4444;
}

.terminal-controls span:nth-child(2) {
    background: #f59e0b;
}

.terminal-controls span:nth-child(3) {
    background: #10b981;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.4);
}

.dark-mode .terminal-title {
    color: rgba(255, 255, 255, 0.4);
}

.terminal-body {
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #334155;
    /* Dark text for light mode */
}

.dark-mode .terminal-body {
    color: #e2e8f0;
}

.code-row {
    white-space: nowrap;
}

.code-row.indent {
    padding-left: 20px;
}

/* Light Mode Syntax Highlighting Overrides */
.glass-terminal .k {
    color: #a855f7;
}

/* Purple */
.glass-terminal .v {
    color: #ef4444;
}

/* Red */
.glass-terminal .f {
    color: #3b82f6;
}

/* Blue */
.glass-terminal .s {
    color: #10b981;
}

/* Green */
.glass-terminal .p {
    color: #f59e0b;
}

/* Orange */
.glass-terminal .n {
    color: #f97316;
}

/* Orange-Red */
.glass-terminal .c {
    color: #eab308;
}

/* Yellow */

/* Dark Mode Syntax Highlighting (Restore Pastels) */
.dark-mode .glass-terminal .k {
    color: #c678dd;
}

.dark-mode .glass-terminal .v {
    color: #e06c75;
}

.dark-mode .glass-terminal .f {
    color: #61afef;
}

.dark-mode .glass-terminal .s {
    color: #98c379;
}

.dark-mode .glass-terminal .p {
    color: #d19a66;
}

.dark-mode .glass-terminal .n {
    color: #d19a66;
}

.dark-mode .glass-terminal .c {
    color: #e5c07b;
}

.terminal-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.05), transparent 70%);
    pointer-events: none;
}

.dark-mode .terminal-glow {
    background: radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.15), transparent 70%);
}

/* 2. Neon Hexagon (Visual) */
.item-shape {
    top: 35%;
    right: -130px;
    z-index: 1;
    transform: translateZ(10px);
}

.neon-hexagon {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    animation: hex-float 6s ease-in-out infinite;
}

.hex-core {
    position: absolute;
    width: 80px;
    height: 92px;
    /* Hexagon ratio */
    background: rgba(239, 68, 68, 0.1);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
    z-index: 10;
    animation: hex-pulse 3s ease-in-out infinite;
}

.hex-core::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: radial-gradient(circle, var(--primary), #7f1d1d);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
}

.hex-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 11;
}

.hex-ring {
    position: absolute;
    border: 2px solid transparent;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.ring-1 {
    width: 120px;
    height: 138px;
    background: transparent;
    border: 2px solid rgba(239, 68, 68, 0.6);
    animation: hex-spin-1 8s linear infinite;
}

.ring-2 {
    width: 150px;
    height: 172px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    animation: hex-spin-2 12s linear infinite reverse;
}

.hex-particles {
    position: absolute;
    width: 200px;
    height: 200px;
    animation: hex-spin-particles 20s linear infinite;
}

.hex-particles::before,
.hex-particles::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.hex-particles::before {
    top: 0;
    left: 50%;
}

.hex-particles::after {
    bottom: 0;
    right: 50%;
}

@keyframes hex-float {

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

    50% {
        transform: translateY(-20px);
    }
}

@keyframes hex-pulse {

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

    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

@keyframes hex-spin-1 {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

@keyframes hex-spin-2 {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

@keyframes hex-spin-particles {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

/* 3. Status Pill (UI) */
.item-ui {
    bottom: 20%;
    left: 25%;
    z-index: 3;
    transform: translateZ(60px) rotateY(-10deg);
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow:
        0 15px 35px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: pill-float 5s ease-in-out infinite;
}

.dark-mode .status-pill {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3);
}

.status-indicator {
    position: relative;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    z-index: 2;
}

.status-indicator .ping {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #10b981;
    border-radius: 50%;
    opacity: 0.5;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-content {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.status-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-icon {
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Animations */
@keyframes hero-float-container {

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

    50% {
        transform: translateY(-10px);
    }
}

@keyframes terminal-hover {

    0%,
    100% {
        transform: translateZ(40px) rotateY(-15deg) rotateX(5deg);
    }

    50% {
        transform: translateZ(40px) rotateY(-12deg) rotateX(3deg) translateY(-10px);
    }
}

@keyframes gyro-spin-1 {
    0% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg);
    }
}

@keyframes gyro-spin-2 {
    0% {
        transform: translate(-50%, -50%) rotateY(60deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateY(60deg) rotateZ(360deg);
    }
}

@keyframes gyro-spin-3 {
    0% {
        transform: translate(-50%, -50%) rotateX(30deg) rotateY(30deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(30deg) rotateY(30deg) rotateZ(360deg);
    }
}

@keyframes core-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 60px rgba(239, 68, 68, 0.8);
    }
}

@keyframes pill-float {

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

    50% {
        transform: translateY(-8px);
    }
}

@keyframes ping {

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

@keyframes flip3D {
    0% {
        transform: perspective(1000px) rotateX(0deg);
    }

    50% {
        transform: perspective(1000px) rotateX(180deg);
    }

    100% {
        transform: perspective(1000px) rotateX(360deg);
    }
}

@keyframes elastic3D {

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

    30% {
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
}

@keyframes wobble3D {

    0%,
    100% {
        transform: perspective(1000px) rotate3d(1, 1, 1, 0deg);
    }

    25% {
        transform: perspective(1000px) rotate3d(1, 1, 1, -5deg);
    }

    75% {
        transform: perspective(1000px) rotate3d(1, 1, 1, 5deg);
    }
}

/* Animation Classes */
.animate-rotate3D {
    animation: rotate3D 4s linear infinite;
    background: var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.animate-flip3D {
    animation: flip3D 4s ease-in-out infinite;
    background: var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.animate-elastic3D {
    animation: elastic3D 2s ease-in-out infinite;
    background: var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.animate-wobble3D {
    animation: wobble3D 3s ease-in-out infinite;
    background: var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* Code Examples Section Spacing */
.code-examples {
    padding-bottom: 80px;
}

.code-examples .section-header {
    margin-bottom: 50px;
}

/* Refined Code Section Visuals */
.code-content {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 2.2;
    /* Significantly increased line height */
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 24px 24px;
    padding: 48px;
    /* Increased padding */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Add a subtle glow effect behind the code block */
.code-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.code-tabs {
    display: flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 24px 24px 0 0;
    padding: 20px 32px 0;
    /* Increased padding */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 14px 28px;
    /* Larger clickable area */
    font-size: 1rem;
    /* Slightly larger font */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.code-tab.active {
    color: #fff;
    border-bottom-color: var(--primary);
}

.code-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px 8px 0 0;
}

.code-line {
    white-space: pre;
    /* Ensure whitespace is respected */
    margin-bottom: 4px;
    /* Add explicit spacing between lines */
}

.code-line.indent {
    padding-left: 20px;
}

/* Syntax Colors */
.k {
    color: #c678dd;
}

/* keyword */
.v {
    color: #e06c75;
}

/* variable */
.f {
    color: #61afef;
}

/* function */
.c {
    color: #e5c07b;
}

/* class */
.s {
    color: #98c379;
}

/* string */
.p {
    color: #d19a66;
}

/* property */
.n {
    color: #d19a66;
}

/* number */
.m {
    color: #61afef;
}

/* method */

/* Abstract Shapes */
.shape-cube {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 12px;
    transform: rotate(45deg);
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4);
    animation: cubeRotate 10s linear infinite;
}

.shape-sphere {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fecaca 0%, #ef4444 100%);
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.1);
    animation: float 8s ease-in-out infinite reverse;
}

.shape-pyramid {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid var(--text-main);
    transform: rotate(15deg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: float 5s ease-in-out infinite 1s;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

/* Keyframes */
@keyframes cubeRotate {
    0% {
        transform: rotate(45deg) rotateX(0) rotateY(0);
    }

    100% {
        transform: rotate(45deg) rotateX(360deg) rotateY(360deg);
    }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    padding: 40px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out);
}

.dark-mode .feature-card {
    background: var(--bg-surface);
    border-color: var(--border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--text-main);
}

.dark-mode .feature-icon {
    background: rgba(255, 255, 255, 0.05);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

/* Showcase Section */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.showcase-item {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.showcase-item:hover {
    background: white;
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.dark-mode .showcase-item:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.showcase-preview {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Animations */
@keyframes float {

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

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.fade-up {
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) forwards;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    animation-delay: 0.1s;
    transition-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
    transition-delay: 0.3s;
}

/* CTA Section */
.cta {
    padding: 120px 0;
    text-align: center;
    background: white;
}

.dark-mode .cta {
    background: var(--bg-body);
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-mode .cta h2 {
    background: none;
    -webkit-text-fill-color: var(--text-main);
    color: var(--text-main);
}

.cta p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    background: white;
    border-top: 1px solid var(--border);
}

.dark-mode .footer {
    background: var(--bg-surface);
    border-color: var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-visual {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Showcase Page Styles */
.showcase-hero-section {
    padding: 140px 0 100px;
    background: white;
    text-align: left;
    text-align: left;
    overflow: visible;
    /* Fix for Firefox 3D clipping */
    perspective: 2000px;
    /* Deeper perspective */
}

.dark-mode .showcase-hero-section {
    background: var(--bg-body);
}

.showcase-hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transform-style: preserve-3d;
}

.showcase-hero-section .hero-content {
    max-width: 500px;
    z-index: 2;
    transform: translateZ(20px);
    /* Slight pop */
}

/* Showcase 3D Visual (New Layered Concept) */
.showcase-hero-section .hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    height: 120%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2000px;
    z-index: 1;
    pointer-events: none;
}

.layers-container {
    position: relative;
    width: 400px;
    height: 500px;
    transform-style: preserve-3d;
    transform: rotateX(55deg) rotateZ(-35deg) rotateY(10deg);
    animation: float-container 10s ease-in-out infinite;
}

.layer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* Base Layer (Glass Window) */
.layer-base {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transform: translateZ(0);
}

.dark-mode .layer-base {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Middle Layer (Content Grid) */
.layer-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1.5fr;
    gap: 20px;
    padding: 30px;
    pointer-events: none;
    transform: translateZ(40px);
}

.layer-item {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    opacity: 0.9;
}

.item-1 {
    grid-column: span 2;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    opacity: 0.1;
}

.item-2,
.item-3 {
    background: white;
}

.dark-mode .item-2,
.dark-mode .item-3 {
    background: var(--bg-surface);
}

/* Top Layer (Floating Elements) */
.layer-top {
    pointer-events: none;
    transform: translateZ(80px);
}

.floating-fab {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
    animation: pulse-fab 3s ease-in-out infinite;
}

.floating-badge {
    position: absolute;
    top: 40px;
    left: -20px;
    padding: 10px 24px;
    background: white;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    color: #ef4444;
    font-size: 0.9rem;
    animation: float-badge 5s ease-in-out infinite;
}

.dark-mode .floating-badge {
    background: var(--bg-surface);
    color: #ef4444;
}

/* Decorative Spheres */
.scene-decoration {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff8888, #ef4444);
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.3);
}

.sphere-1 {
    width: 60px;
    height: 60px;
    top: -30px;
    right: -30px;
    transform: translateZ(60px);
    animation: float-sphere-1 6s ease-in-out infinite;
}

.sphere-2 {
    width: 40px;
    height: 40px;
    bottom: 20%;
    left: -50px;
    transform: translateZ(-20px);
    opacity: 0.6;
    animation: float-sphere-2 8s ease-in-out infinite;
}

/* Animations */
@keyframes float-container {

    0%,
    100% {
        transform: rotateX(55deg) rotateZ(-35deg) rotateY(10deg) translateY(0);
    }

    50% {
        transform: rotateX(55deg) rotateZ(-35deg) rotateY(10deg) translateY(-20px);
    }
}

@keyframes pulse-fab {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 25px 50px rgba(239, 68, 68, 0.5);
    }
}

@keyframes float-badge {

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

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-sphere-1 {

    0%,
    100% {
        transform: translateZ(60px) translateY(0);
    }

    50% {
        transform: translateZ(60px) translateY(-20px);
    }
}

@keyframes float-sphere-2 {

    0%,
    100% {
        transform: translateZ(-20px) translateY(0);
    }

    50% {
        transform: translateZ(-20px) translateY(15px);
    }
}

/* Showcase Grid */
.showcase-grid-section {
    padding: 100px 0;
    background: #f8fafc;
    perspective: 1000px;
}

.dark-mode .showcase-grid-section {
    background: #0f172a;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
}

.showcase-item {
    background: white;
    border-radius: 24px;
    overflow: visible;
    /* Allow 3D pop-out */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
    position: relative;
}

.dark-mode .showcase-item {
    background: var(--bg-surface);
}

.showcase-item:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-2deg);
    box-shadow:
        20px 40px 60px -15px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.showcase-image {
    height: 260px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    transform: translateZ(0);
    transition: transform 0.5s ease;
}

.dark-mode .showcase-image {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.showcase-item:hover .showcase-image {
    transform: translateZ(20px);
    /* Image pops out */
}

.showcase-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
}

.showcase-content {
    padding: 32px;
    background: white;
    border-radius: 0 0 24px 24px;
    transform: translateZ(10px);
    /* Content floats slightly */
}

.dark-mode .showcase-content {
    background: var(--bg-surface);
}

.showcase-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    transform: translateZ(10px);
}

.showcase-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    transform: translateZ(5px);
}

.showcase-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    transform: translateZ(15px);
    /* Tags float most */
}

.showcase-tag {
    padding: 6px 16px;
    background: #f1f5f9;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark-mode .showcase-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.showcase-item:hover .showcase-tag {
    background: #e2e8f0;
    color: var(--text-main);
    transform: translateY(-2px);
}

@keyframes spin-3d {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float-3d-deep {

    0%,
    100% {
        transform: translateY(0) rotateY(-15deg) rotateX(10deg) translateZ(50px);
    }

    50% {
        transform: translateY(-30px) rotateY(-5deg) rotateX(5deg) translateZ(80px);
    }
}

@keyframes pulse-3d {

    0%,
    100% {
        transform: rotateX(-60deg) rotateZ(-45deg) rotateY(15deg) translateZ(20px) scale(1);
    }

    50% {
        transform: rotateX(-60deg) rotateZ(-45deg) rotateY(15deg) translateZ(40px) scale(1.1);
    }
}

/* Responsive Showcase */
@media (max-width: 768px) {
    .showcase-hero-section {
        text-align: center;
        padding: 100px 0 60px;
    }

    .showcase-hero-section .container {
        flex-direction: column;
    }

    .showcase-hero-section .hero-visual {
        position: relative;
        width: 100%;
        height: 300px;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 40px;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* Playground Styles */
.playground-section {
    padding-top: 80px;
    min-height: 100vh;
    background: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(239, 68, 68, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(239, 68, 68, 0.05) 0px, transparent 50%);
}

.playground-container {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 24px;
    padding: 24px;
    height: calc(100vh - 80px);
    max-width: 1600px;
    margin: 0 auto;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.5);
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.panel-header h3 i {
    color: var(--primary);
}

/* Controls Panel */
.controls-panel {
    padding: 0;
}

.control-group {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.control-group:last-child {
    border-bottom: none;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

select,
input[type="range"] {
    width: 100%;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input[type="range"] {
    padding: 0;
    height: 6px;
    background: #e2e8f0;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.play-button {
    margin: 24px;
    padding: 14px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.3);
}

.play-button.playing {
    background: #334155;
    box-shadow: 0 10px 20px rgba(51, 65, 85, 0.2);
}

/* Preview Panel */
.preview-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.preview-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.preview-3d-scene {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-object {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(-15deg);
    transition: transform 0.5s ease;
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    backdrop-filter: blur(5px);
    backface-visibility: visible;
}

.face-front {
    transform: translateZ(60px);
    background: rgba(239, 68, 68, 0.2);
}

.face-back {
    transform: rotateY(180deg) translateZ(60px);
}

.face-right {
    transform: rotateY(90deg) translateZ(60px);
}

.face-left {
    transform: rotateY(-90deg) translateZ(60px);
}

.face-top {
    transform: rotateX(90deg) translateZ(60px);
}

.face-bottom {
    transform: rotateX(-90deg) translateZ(60px);
}

/* Code Panel */
.code-panel {
    background: #1e293b;
    color: #e2e8f0;
    border: none;
}

.code-panel .panel-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-panel .panel-header h3 {
    color: white;
}

.code-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.code-tab.active {
    color: white;
    border-bottom-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.code-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.code-content.active {
    display: block;
}

.code-content pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.copy-button {
    margin: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 3D Animations */
@keyframes rotate3D {
    from {
        transform: rotate3d(1, 1, 1, 0deg);
    }

    to {
        transform: rotate3d(1, 1, 1, 360deg);
    }
}

@keyframes flip3D {
    from {
        transform: perspective(400px) rotateY(0);
    }

    to {
        transform: perspective(400px) rotateY(360deg);
    }
}

@keyframes float3D {

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

    50% {
        transform: translateY(-20px) translateZ(50px);
    }
}

@keyframes wobble3D {

    0%,
    100% {
        transform: rotate3d(1, 1, 0, 0deg);
    }

    25% {
        transform: rotate3d(1, 1, 0, -20deg);
    }

    50% {
        transform: rotate3d(1, 1, 0, 10deg);
    }

    75% {
        transform: rotate3d(1, 1, 0, -5deg);
    }
}

@keyframes elastic3D {

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

    30% {
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
}

/* Responsive Playground */
@media (max-width: 1024px) {
    .playground-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 400px auto;
        height: auto;
    }

    .preview-panel {
        order: -1;
        height: 400px;
    }
}

/* Docs Page Styles */
.docs-hero {
    position: relative;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.docs-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
}

.docs-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.docs-hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    perspective: 1000px;
    overflow: hidden;
}

.hero-3d-scene {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.hero-floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.card-1 {
    top: 20%;
    left: 20%;
    animation: float-3d-deep 8s infinite ease-in-out;
}

.card-2 {
    top: 30%;
    right: 20%;
    animation: float-3d-deep 10s infinite ease-in-out reverse;
    animation-delay: -2s;
}

.card-3 {
    bottom: 20%;
    left: 50%;
    animation: float-3d-deep 12s infinite ease-in-out;
    animation-delay: -5s;
}

/* Docs Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h4 {
    padding: 0 24px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-section a:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--primary);
}

.sidebar-section a.active {
    background: rgba(239, 68, 68, 0.05);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-section a i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Main Content */
.docs-main {
    padding-bottom: 100px;
}

.docs-section {
    margin-bottom: 80px;
    scroll-margin-top: 120px;
}

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

.docs-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.section-badge {
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.docs-section p.lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.info-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.info-card .icon-box {
    width: 48px;
    height: 48px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Code Preview Block */
.code-preview-block {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header span {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.code-header .copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.code-header .copy-btn:hover {
    color: white;
}

.code-preview-block pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
}

.code-preview-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
}

/* Animation Grid Showcase */
.animation-grid-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.anim-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.anim-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.anim-preview {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 12px;
    margin: 0 auto 16px;
}

.anim-card span {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Responsive Docs */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        display: none;
        /* Hide sidebar on mobile for now, or convert to drawer */
    }

    .docs-hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Dark Mode Component Overrides */
.dark-mode .motion-nav {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .glass-panel,
.dark-mode .docs-sidebar {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.dark-mode .panel-header,
.dark-mode .sidebar-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .control-group,
.dark-mode .sidebar-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode select,
.dark-mode input[type="range"],
.dark-mode .control-group input,
.dark-mode .control-group select {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.dark-mode .preview-panel,
.dark-mode .anim-card,
.dark-mode .info-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .preview-grid {
    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);
}

.dark-mode .docs-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.dark-mode .hero-floating-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dark-mode .sidebar-section a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .sidebar-section a.active {
    background: rgba(239, 68, 68, 0.1);
}

.dark-mode .code-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .playground-section {
    background-image:
        radial-gradient(at 0% 0%, rgba(239, 68, 68, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(239, 68, 68, 0.1) 0px, transparent 50%);
}

.dark-mode .showcase-hero-section {
    background: var(--bg-body);
}

.dark-mode .showcase-item,
.dark-mode .showcase-content {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .showcase-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.dark-mode .hero-card-glass {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.dark-mode .hero-card-glass.code-preview {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .hero-shape-visual {
    box-shadow:
        0 20px 40px rgba(239, 68, 68, 0.2),
        inset -10px -10px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .hero-ui-notification {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.95);
}

.dark-mode .notif-title {
    color: #f1f5f9;
}


.dark-mode .hero {
    background: radial-gradient(circle at 15% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(30, 41, 59, 0.5) 0%, transparent 25%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.dark-mode .hero-badge {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.dark-mode .btn-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.dark-mode .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
}

/* Code Examples Section */
.code-examples {
    padding: 100px 0;
    background: var(--bg-surface);
}

.dark-mode .code-examples {
    background: #0f172a;
}

.code-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.code-tab {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(239, 68, 68, 0.05);
}

.code-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.code-content {
    max-width: 800px;
    margin: 0 auto;
    background: #1e293b;
    /* Always dark for code */
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block {
    margin: 0;
    padding: 0;
    overflow-x: auto;
    display: none;
}

.code-block.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.code-block code {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Premium 3D Showcase */
.premium-showcase {
    padding: 120px 0;
    background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    position: relative;
}

.dark-mode .premium-showcase {
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}

.showcase-stage {
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    position: relative;
    margin: 60px 0;
}

.stage-content {
    position: relative;
    transform-style: preserve-3d;
    animation: float-stage 6s ease-in-out infinite;
}

.glass-card-3d {
    width: 400px;
    background: rgba(30, 41, 59, 0.95);
    /* Dark background for code readability */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    transform: rotateX(10deg) rotateY(-10deg);
    transform-style: preserve-3d;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.dark-mode .glass-card-3d {
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.glass-card-3d:hover {
    transform: rotateX(0deg) rotateY(0deg) scale(1.02);
}

.card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.code-preview-3d {
    font-family: 'Fira Code', monospace;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.keyword {
    color: #c678dd;
}

.variable {
    color: #e06c75;
}

.string {
    color: #98c379;
}

.function {
    color: #61afef;
}

.number {
    color: #d19a66;
}

.float-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: orbit 8s infinite linear;
}

.icon-react {
    color: #61dafb;
    top: -30px;
    right: -30px;
    transform: translateZ(50px);
    animation-delay: 0s;
}

.icon-vue {
    color: #42b883;
    bottom: 40px;
    left: -40px;
    transform: translateZ(80px);
    animation-delay: 2s;
}

.icon-js {
    color: #f7df1e;
    bottom: -30px;
    right: 20px;
    transform: translateZ(30px);
    animation-delay: 4s;
}

.stage-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.showcase-actions {
    text-align: center;
}

.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.glow-effect:hover::after {
    transform: scale(1);
}

@keyframes float-stage {

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

    50% {
        transform: translateY(-20px) rotateX(2deg);
    }
}

@keyframes orbit {
    0% {
        transform: translateZ(50px) translateY(0);
    }

    50% {
        transform: translateZ(50px) translateY(-15px);
    }

    100% {
        transform: translateZ(50px) translateY(0);
    }
}

/* Docs Spotlight Section */
.docs-spotlight {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface) 100%);
    overflow: hidden;
}

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

.docs-content h2 {
    font-size: 3rem;
    margin-bottom: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
}

.docs-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.docs-features {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.d-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.d-feature i {
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(239, 68, 68, 0.1);
    padding: 16px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.d-feature:hover i {
    transform: translateY(-5px) rotate(5deg);
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

/* 3D Glass Stack Visual */
.docs-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.glass-stack-3d {
    position: relative;
    width: 300px;
    height: 380px;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(10deg);
    animation: floatStack 6s ease-in-out infinite;
}

.stack-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dark-mode .stack-layer {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.layer-1 {
    transform: translateZ(-60px) translateY(30px) translateX(30px);
    opacity: 0.6;
    z-index: 1;
}

.layer-2 {
    transform: translateZ(-30px) translateY(15px) translateX(15px);
    opacity: 0.8;
    z-index: 2;
}

.layer-3 {
    transform: translateZ(0);
    z-index: 3;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark-mode .layer-3 {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.2) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.glass-stack-3d:hover .layer-1 {
    transform: translateZ(-100px) translateY(50px) translateX(60px) rotateY(-10deg);
}

.glass-stack-3d:hover .layer-2 {
    transform: translateZ(-50px) translateY(25px) translateX(30px) rotateY(-5deg);
}

.glass-stack-3d:hover .layer-3 {
    transform: translateZ(20px) rotateY(5deg);
}

.layer-content {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.code-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.width-80 {
    width: 80%;
}

.width-70 {
    width: 70%;
}

.width-60 {
    width: 60%;
}

.width-50 {
    width: 50%;
}

.width-40 {
    width: 40%;
}

.doc-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 20px rgba(239, 68, 68, 0.3));
}

.layer-3 h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0;
}

/* Orbit Particles */
.orbit-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    filter: blur(2px);
    opacity: 0.6;
}

.p1 {
    width: 10px;
    height: 10px;
    top: 20%;
    left: -20%;
    animation: orbit1 8s linear infinite;
}

.p2 {
    width: 15px;
    height: 15px;
    bottom: -10%;
    right: -10%;
    animation: orbit2 10s linear infinite;
}

.p3 {
    width: 8px;
    height: 8px;
    top: 50%;
    right: -30%;
    animation: orbit3 12s linear infinite;
}

@keyframes floatStack {

    0%,
    100% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(0);
    }

    50% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(-20px);
    }
}

@keyframes orbit1 {
    0% {
        transform: rotate(0deg) translateX(150px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(150px) rotate(-360deg);
    }
}

@keyframes orbit2 {
    0% {
        transform: rotate(0deg) translateX(180px) rotate(0deg);
    }

    100% {
        transform: rotate(-360deg) translateX(180px) rotate(360deg);
    }
}

@keyframes orbit3 {
    0% {
        transform: rotate(0deg) translateY(120px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateY(120px) rotate(-360deg);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .docs-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .docs-content p {
        margin: 0 auto 40px;
    }

    .docs-features {
        justify-content: center;
    }

    .docs-visual {
        height: 350px;
        margin-top: 40px;
    }
}

/* Playground Spotlight Section */
.playground-spotlight {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
    overflow: hidden;
}

.playground-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.playground-content h2 {
    font-size: 3rem;
    margin-bottom: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
}

.playground-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.playground-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.p-feature {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.dark-mode .p-feature {
    background: rgba(30, 41, 59, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.p-feature:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.pf-icon {
    width: 50px;
    height: 50px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.pf-text h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.pf-text p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-muted);
}

/* 3D Editor Scene */
.playground-visual {
    position: relative;
    height: 500px;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-scene-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(15deg) rotateX(5deg);
    animation: floatScene 8s ease-in-out infinite;
}

.floating-window {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dark-mode .floating-window {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.editor-window {
    width: 320px;
    height: 240px;
    top: 10%;
    left: 0;
    transform: translateZ(20px);
    z-index: 2;
}

.preview-window {
    width: 280px;
    height: 280px;
    bottom: 10%;
    right: 0;
    transform: translateZ(60px);
    z-index: 3;
}

.window-header {
    height: 36px;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .window-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.dots {
    display: flex;
    gap: 6px;
    margin-right: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.window-content {
    padding: 20px;
    height: calc(100% - 36px);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    position: relative;
}

.window-content.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
}

.dark-mode .window-content.centered {
    background: rgba(0, 0, 0, 0.2);
}

.code-row {
    line-height: 1.6;
    white-space: nowrap;
}

.indent {
    padding-left: 20px;
}

.keyword {
    color: #ff79c6;
}

.property {
    color: #8be9fd;
}

.value {
    color: #f1fa8c;
}

.function {
    color: #50fa7b;
}

.number {
    color: #bd93f9;
}

.cursor-blink {
    display: inline-block;
    color: var(--primary);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

/* Live Shape Animation */
.live-shape {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 16px;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 20px 20px;
    opacity: 0.5;
    z-index: -1;
}

/* Connecting Elements */
.connect-line {
    position: absolute;
    top: 40%;
    left: 40%;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    transform: rotate(45deg);
    opacity: 0.5;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .floating-icon {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.icon-css {
    top: 0;
    right: 10%;
    color: #264de4;
    transform: translateZ(40px);
    animation: floatIcon 6s ease-in-out infinite;
}

.icon-react {
    bottom: 20%;
    left: -5%;
    color: #61dbfb;
    transform: translateZ(80px);
    animation: floatIcon 5s ease-in-out infinite reverse;
}

@keyframes floatScene {

    0%,
    100% {
        transform: rotateY(15deg) rotateX(5deg) translateY(0);
    }

    50% {
        transform: rotateY(10deg) rotateX(2deg) translateY(-20px);
    }
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateZ(40px) translateY(0);
    }

    50% {
        transform: translateZ(40px) translateY(-15px);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes float {

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

    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .playground-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .playground-visual {
        order: -1;
        height: 400px;
    }

    .editor-window {
        width: 260px;
        height: 200px;
        left: 50%;
        transform: translateX(-60%) translateZ(20px);
    }

    .preview-window {
        width: 220px;
        height: 220px;
        right: 50%;
        transform: translateX(60%) translateZ(60px);
    }
}

/* Dark Mode Navbar Override */
.dark-mode .motion-nav {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Hero Code Card Fixes */
.hero-code-card {
    width: 380px !important;
    /* Increased width */
    padding: 30px !important;
    /* Increased padding */
}

.code-content-mini {
    font-size: 1.1rem !important;
    /* Larger font */
    margin-top: 25px !important;
}

.code-line {
    background: transparent !important;
    display: block;
    line-height: 1.8 !important;
    /* Increased line height */
    margin-bottom: 4px;
}

.code-line span {
    background: transparent !important;
}

/* Syntax Highlighting for Hero */
.k {
    color: #c678dd !important;
}

/* Keyword */
.v {
    color: #e06c75 !important;
}

/* Variable */
.s {
    color: #98c379 !important;
}

/* String */
.f {
    color: #61afef !important;
}

/* Function */
.p {
    color: #d19a66 !important;
}

/* Property */
.n {
    color: #d19a66 !important;
}

/* Number */

/* --- User Profile Dropdown --- */
.nav-auth {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-dropdown-wrapper {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 6px 12px 6px 6px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
}

.nav-auth .profile-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary) !important;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-trigger i {
    font-size: 0.8rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.nav-auth .profile-trigger:hover i {
    color: var(--primary) !important;
    transform: translateY(2px);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
}

.profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.header-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

.header-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.menu-item:hover i {
    color: var(--primary);
}

.logout-item {
    color: #ef4444;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-item i {
    color: #ef4444;
}

/* Responsive Profile */
@media (max-width: 768px) {
    .profile-name {
        display: none;
    }

    .profile-trigger {
        padding: 4px;
        border-radius: 50%;
    }

    .profile-trigger i {
        display: none;
    }

    .profile-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0 0 20px 20px;
        border-left: none;
        border-right: none;
    }
}

/* --- Ultra-Modern Profile Animations --- */

/* 1. Advanced Aurora Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-color);
    overflow: hidden;
    transition: background 0.3s ease;
}

.ambient-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.04;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: auroraFloat 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: screen;
}

/* Light mode adjustment */
body:not(.dark-mode) .aurora-blob {
    mix-blend-mode: multiply;
    opacity: 0.25;
    filter: blur(100px);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.5) 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 30s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 35s;
}

/* Floating Particles Effect */
.ambient-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 120% 120%;
    animation: particleFloat 60s linear infinite;
    opacity: 0.3;
    z-index: 0;
}

@keyframes auroraFloat {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(50px, -30px) scale(1.1) rotate(10deg);
    }

    66% {
        transform: translate(-30px, 50px) scale(0.95) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

@keyframes particleFloat {
    0% {
        background-position: 0% 0%;
    }

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

/* 2. Clean Glass Profile Card (Reverted & Refined) */
.profile-card {
    position: relative;
    background: var(--glass-bg);
    /* Revert to standard glass variable */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    z-index: 1;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* 3. Magnetic Button & Inputs */
.btn-magnetic {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.btn-magnetic::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-magnetic:hover::after {
    width: 300px;
    height: 300px;
}

/* 4. Gradient Text Flow */
.text-gradient-flow {
    background: linear-gradient(to right,
            var(--primary),
            #8b5cf6,
            #3b82f6,
            var(--primary));
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 5s linear infinite;
}

@keyframes textFlow {
    to {
        background-position: 300% center;
    }
}

/* Staggered Entrance (Preserved) */
.animate-entry {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Enhanced Input Focus */
.form-input:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15), 0 0 20px rgba(239, 68, 68, 0.1);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

/* Stat Card Hover */
.stat-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Avatar Pulse */
.profile-avatar-large {
    animation: avatarPulse 3s infinite ease-in-out;
}

@keyframes avatarPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* --- NEW ANIMATIONS (Library Expansion) --- */

/* 1. Text Effects */
.tracking-in {
    animation: tracking-in 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@keyframes tracking-in {
    0% {
        letter-spacing: -0.5em;
        opacity: 0;
    }

    40% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.tracking-out {
    animation: tracking-out 0.7s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes tracking-out {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        letter-spacing: -0.5em;
        opacity: 0;
    }
}

.blur-in {
    animation: blur-in 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes blur-in {
    0% {
        filter: blur(12px);
        opacity: 0;
    }

    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.blur-out {
    animation: blur-out 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes blur-out {
    0% {
        filter: blur(0.01);
    }

    100% {
        filter: blur(12px) opacity(0%);
    }
}

.focus-in {
    animation: focus-in 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes focus-in {
    0% {
        filter: blur(12px);
        opacity: 0;
    }

    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.text-shadow-pop {
    animation: text-shadow-pop 0.6s both;
}

@keyframes text-shadow-pop {
    0% {
        text-shadow: 0 0 #555555, 0 0 #555555;
        transform: translateY(0);
    }

    100% {
        text-shadow: -1px -1px #555555, -2px -2px #555555, -3px -3px #555555, -4px -4px #555555;
        transform: translateY(-4px);
    }
}

/* 2. Attention Seekers */
.vibrate {
    animation: vibrate 0.3s linear infinite both;
}

@keyframes vibrate {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.flicker {
    animation: flicker 2s linear infinite both;
}

@keyframes flicker {

    0%,
    19.999%,
    22%,
    62.999%,
    64%,
    64.999%,
    70%,
    100% {
        opacity: .99;
    }

    20%,
    21.999%,
    63%,
    63.999%,
    65%,
    69.999% {
        opacity: 0.4;
    }
}

.jello-horizontal {
    animation: jello-horizontal 0.9s both;
}

@keyframes jello-horizontal {
    0% {
        transform: scale3d(1, 1, 1);
    }

    30% {
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        transform: scale3d(1.05, 0.95, 1);
    }

    100% {
        transform: scale3d(1, 1, 1);
    }
}

.jello-vertical {
    animation: jello-vertical 0.9s both;
}

@keyframes jello-vertical {
    0% {
        transform: scale3d(1, 1, 1);
    }

    30% {
        transform: scale3d(0.75, 1.25, 1);
    }

    40% {
        transform: scale3d(1.25, 0.75, 1);
    }

    50% {
        transform: scale3d(0.85, 1.15, 1);
    }

    65% {
        transform: scale3d(1.05, 0.95, 1);
    }

    75% {
        transform: scale3d(0.95, 1.05, 1);
    }

    100% {
        transform: scale3d(1, 1, 1);
    }
}

.wobble-hor-bottom {
    animation: wobble-hor-bottom 0.8s both;
}

@keyframes wobble-hor-bottom {

    0%,
    100% {
        transform: translateX(0%);
        transform-origin: 50% 50%;
    }

    15% {
        transform: translateX(-30px) rotate(-6deg);
    }

    30% {
        transform: translateX(15px) rotate(6deg);
    }

    45% {
        transform: translateX(-15px) rotate(-3.6deg);
    }

    60% {
        transform: translateX(9px) rotate(2.4deg);
    }

    75% {
        transform: translateX(-6px) rotate(-1.2deg);
    }
}

/* 3. Backgrounds */
.color-cycle {
    animation: color-cycle 4s infinite alternate;
}

@keyframes color-cycle {
    0% {
        background: #ef4444;
    }

    50% {
        background: #3b82f6;
    }

    100% {
        background: #10b981;
    }
}

.gradient-flow {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient-flow 5s ease infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

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

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

/* 4. Borders */
.border-pulse {
    animation: border-pulse 2s infinite;
}

@keyframes border-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* 5. Exits */
.slide-out-bck {
    animation: slide-out-bck 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes slide-out-bck {
    0% {
        transform: translateZ(0);
        opacity: 1;
    }

    100% {
        transform: translateZ(-1100px);
        opacity: 0;
    }
}

.slit-out-vertical {
    animation: slit-out-vertical 0.5s ease-in both;
}

@keyframes slit-out-vertical {
    0% {
        transform: translateZ(0) rotateY(0);
        opacity: 1;
    }

    54% {
        transform: translateZ(-160px) rotateY(87deg);
        opacity: 1;
    }

    100% {
        transform: translateZ(-800px) rotateY(90deg);
        opacity: 0;
    }
}

.roll-out {
    animation: roll-out 0.6s ease-in both;
}

@keyframes roll-out {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate3d(0, 0, 1, 0deg);
    }

    100% {
        opacity: 0;
        transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
    }
}

/* 6. Advanced 3D */
.rotate-scale-up {
    animation: rotate-scale-up 0.65s linear both;
}

@keyframes rotate-scale-up {
    0% {
        transform: scale(1) rotateZ(0);
    }

    50% {
        transform: scale(2) rotateZ(180deg);
    }

    100% {
        transform: scale(1) rotateZ(360deg);
    }
}

.swirl-in-fwd {
    animation: swirl-in-fwd 0.6s ease-out both;
}

@keyframes swirl-in-fwd {
    0% {
        transform: rotate(-540deg) scale(0);
        opacity: 0;
    }

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

/* Apply new animations to preview elements */
.preview-element.tracking-in {
    animation-name: tracking-in;
}

.preview-element.tracking-out {
    animation-name: tracking-out;
}

.preview-element.blur-in {
    animation-name: blur-in;
}

.preview-element.blur-out {
    animation-name: blur-out;
}

.preview-element.focus-in {
    animation-name: focus-in;
}

.preview-element.text-shadow-pop {
    animation-name: text-shadow-pop;
}

.preview-element.vibrate {
    animation-name: vibrate;
}

.preview-element.flicker {
    animation-name: flicker;
}

.preview-element.jello-horizontal {
    animation-name: jello-horizontal;
}

.preview-element.jello-vertical {
    animation-name: jello-vertical;
}

.preview-element.wobble-hor-bottom {
    animation-name: wobble-hor-bottom;
}

.preview-element.color-cycle {
    animation-name: color-cycle;
}

.preview-element.gradient-flow {
    animation-name: gradient-flow;
}

.preview-element.border-pulse {
    animation-name: border-pulse;
}

.preview-element.slide-out-bck {
    animation-name: slide-out-bck;
}

.preview-element.slit-out-vertical {
    animation-name: slit-out-vertical;
}

.preview-element.roll-out {
    animation-name: roll-out;
}

.preview-element.rotate-scale-up {
    animation-name: rotate-scale-up;
}

.preview-element.swirl-in-fwd {
    animation-name: swirl-in-fwd;
}