body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at var(--bg-x, 50%) var(--bg-y, 50%), #0f0a2a, #020208 70%);
    color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    perspective: 1200px;
    transition: background 0.1s ease-out;
    cursor: none; /* Hide default cursor to use custom magnetic cursor */
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* Custom Magnetic Cursor */
.custom-cursor {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(56, 189, 248, 0.6);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s, border-color 0.3s;
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: #38bdf8;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.1s ease;
}

/* Hover state for cursor */
body.cursor-hover .custom-cursor {
    width: 60px;
    height: 60px;
    background-color: rgba(56, 189, 248, 0.1);
    border-color: #2dd4bf;
}
body.cursor-hover .custom-cursor-dot {
    background: #2dd4bf;
    transform: translate(-50%, -50%) scale(1.5);
}

/* Floating Interactive Physics Spheres */
.floating-sphere {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%),
                linear-gradient(135deg, var(--color1), var(--color2));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3),
                inset 0 10px 20px rgba(255, 255, 255, 0.25);
    z-index: 2;
    cursor: grab;
    user-select: none;
}
.floating-sphere:active {
    cursor: grabbing;
}

/* Main 3D Card Container */
.container {
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3.5rem 2.5rem;
    border-radius: 28px;
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-align: center;
    max-width: 480px;
    width: 90%;
    animation: scaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
    overflow: hidden;
    
    /* 3D Transform settings */
    transform-style: preserve-3d;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform 0.1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Dynamic Glare Effect */
.container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: 5;
    border-radius: 28px;
}

/* 3D Depth layers */
.badge {
    display: inline-block;
    background: rgba(45, 212, 191, 0.15);
    color: #2dd4bf;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 9999px;
    letter-spacing: 0.12em;
    border: 1px solid rgba(45, 212, 191, 0.3);
    margin-bottom: 1.8rem;
    transform: translateZ(50px);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2);
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0 0 1.2rem 0;
    background: linear-gradient(135deg, #38bdf8, #a855f7, #ec4899);
    background-size: 200% auto;
    animation: shineText 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    transform: translateZ(80px);
    text-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
}

@keyframes shineText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 2.2rem;
    transform: translateZ(40px);
}

.action-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateZ(60px);
    transform-style: preserve-3d;
}

.btn {
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
    transform: translateZ(30px);
}

.btn:hover {
    transform: translateZ(45px) scale(1.05);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.7);
    background: linear-gradient(135deg, #2dd4bf, #38bdf8);
}

.btn:active {
    transform: translateZ(20px) scale(0.98);
}

.lang-label {
    margin-top: 1.2rem;
    margin-bottom: 0;
    font-size: 13px;
    color: #64748b;
    transform: translateZ(20px);
}

#lang-name {
    color: #38bdf8;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* FX Control Panel */
.control-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.control-panel.collapsed {
    transform: translateY(calc(100% - 45px));
}

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

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
}

.panel-toggle {
    font-size: 10px;
    transition: transform 0.3s;
}

.control-panel.collapsed .panel-toggle {
    transform: rotate(180deg);
}

.panel-content {
    padding: 18px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-group label span {
    float: right;
    color: #2dd4bf;
    font-weight: bold;
}

.control-group input[type="range"] {
    width: 100%;
    accent-color: #38bdf8;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    height: 6px;
    outline: none;
}

.toggle-btn {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    padding: 8px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 11px;
    cursor: none;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: rgba(45, 212, 191, 0.2);
    border-color: #2dd4bf;
    color: #2dd4bf;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.2);
}

/* Neon Particle Styles */
.particle {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: screen;
    z-index: 9999;
    animation: floatAndFade var(--duration) cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes floatAndFade {
    0% {
        transform: translate3d(var(--x), var(--y), 0) scale(0);
        opacity: 1;
        box-shadow: 0 0 15px var(--color), 0 0 30px var(--color);
    }
    100% {
        transform: translate3d(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy)), 0) scale(1.5);
        opacity: 0;
        box-shadow: 0 0 30px var(--color), 0 0 60px var(--color);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}