* { 
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            background: linear-gradient(165deg, #0d0e12 0%, #090a0e 50%, #111218 100%);
            font-family: 'Outfit', 'Noto Sans SC', sans-serif;
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Noise texture overlay */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            z-index: 9998;
            pointer-events: none;
            opacity: 0.025;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        }

        /* Ambient background effects */
        .ambient-layer {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }
        
        .orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.4;
            animation: float-gentle 12s ease-in-out infinite;
        }
        
        .orb-1 {
            width: 600px;
            height: 600px;
            top: -200px;
            left: -150px;
            background: radial-gradient(circle, rgba(0, 212, 255, 0.25) 0%, transparent 70%);
            animation-delay: 0s;
        }
        
        .orb-2 {
            width: 500px;
            height: 500px;
            bottom: -100px;
            right: -100px;
            background: radial-gradient(circle, rgba(0, 229, 160, 0.15) 0%, transparent 70%);
            animation-delay: -4s;
        }
        
        .orb-3 {
            width: 400px;
            height: 400px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
            animation-delay: -8s;
        }

        /* Grid pattern overlay */
        .grid-pattern {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 1;
            opacity: 0.03;
            background-image: 
                linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
            background-size: 60px 60px;
        }

        /* Premium glass card */
        .glass-card {
            background: linear-gradient(145deg, 
                rgba(24, 28, 40, 0.92) 0%, 
                rgba(18, 20, 30, 0.95) 100%
            );
            backdrop-filter: blur(32px) saturate(1.5);
            -webkit-backdrop-filter: blur(32px) saturate(1.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            position: relative;
            overflow: hidden;
            transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
        }
        
        .glass-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(0, 212, 255, 0.5) 15%, 
                rgba(0, 229, 160, 0.35) 50%, 
                rgba(168, 85, 247, 0.25) 85%, 
                transparent 100%
            );
            opacity: 0.8;
        }
        
        .glass-card:hover {
            border-color: rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
        }

        /* Accent border glow */
        .glow-border {
            position: relative;
        }
        
        .glow-border::after {
            content: '';
            position: absolute;
            top: 0;
            left: 24px;
            right: 24px;
            height: 2px;
            background: linear-gradient(90deg, 
                transparent 0%,
                rgba(0, 212, 255, 0.6) 20%, 
                rgba(0, 229, 160, 0.4) 50%,
                rgba(0, 212, 255, 0.6) 80%,
                transparent 100%
            );
            filter: blur(2px);
        }

        /* Premium input field */
        .premium-input {
            background: linear-gradient(135deg, 
                rgba(10, 11, 15, 0.95) 0%, 
                rgba(18, 20, 28, 0.8) 100%
            );
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            color: #e5e7eb;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            outline: none;
            position: relative;
            line-height: 1.7;
        }
        
        .premium-input::placeholder {
            color: rgba(120, 128, 155, 0.65);
            line-height: 1.7;
        }
        
        .premium-input:focus {
            border-color: rgba(0, 212, 255, 0.5);
            box-shadow: 
                0 0 0 4px rgba(0, 212, 255, 0.08),
                inset 0 0 50px rgba(0, 212, 255, 0.02),
                0 8px 32px rgba(0, 0, 0, 0.25);
        }

        /* Option pill - refined */
        .opt-pill {
            background: rgba(30, 34, 48, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
            position: relative;
            overflow: hidden;
        }
        
        .opt-pill::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, 
                rgba(255,255,255,0.05) 0%, 
                transparent 50%
            );
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .opt-pill:hover {
            background: rgba(40, 45, 58, 0.9);
            border-color: rgba(255, 255, 255, 0.1);
            transform: translateY(-1px);
        }
        
        .opt-pill:hover::before {
            opacity: 1;
        }
        
        .opt-pill.active {
            border-color: rgba(0, 212, 255, 0.6);
            background: linear-gradient(135deg, 
                rgba(0, 212, 255, 0.1) 0%, 
                rgba(0, 212, 255, 0.04) 100%
            );
            box-shadow: 
                0 0 35px rgba(0, 212, 255, 0.12),
                inset 0 0 25px rgba(0, 212, 255, 0.02);
        }
        
        .opt-pill.active .opt-indicator {
            background: #00d4ff;
            box-shadow: 0 0 14px rgba(0, 212, 255, 0.7);
        }

        /* Style chip - refined */
        .style-chip {
            background: rgba(30, 34, 45, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
            position: relative;
            overflow: hidden;
        }
        
        .style-chip::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, 
                rgba(0, 229, 160, 0.08) 0%, 
                transparent 100%
            );
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .style-chip:hover {
            background: rgba(42, 48, 62, 0.9);
            border-color: rgba(255, 255, 255, 0.12);
            transform: translateY(-1px) scale(1.02);
        }
        
        .style-chip:hover::after {
            opacity: 1;
        }
        
        .style-chip.active {
            border-color: rgba(163, 255, 111, 0.55);
            background: linear-gradient(135deg, 
                rgba(163, 255, 111, 0.1) 0%, 
                rgba(163, 255, 111, 0.03) 100%
            );
            box-shadow: 0 0 28px rgba(163, 255, 111, 0.1);
        }
        
        .style-chip.active .chip-label {
            color: #a3ff6f;
        }

        /* Primary generate button */
        .btn-primary {
            position: relative;
            background: linear-gradient(135deg, #00c8ec 0%, #00aed4 50%, #0098c0 100%);
            border-radius: 16px;
            font-weight: 600;
            letter-spacing: 0.01em;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
            box-shadow: 
                0 6px 28px rgba(0, 212, 255, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.25);
        }
        
        .btn-primary::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, 
                rgba(255,255,255,0.25) 0%, 
                rgba(255,255,255,0.08) 50%,
                transparent 100%
            );
            opacity: 0.9;
        }
        
        .btn-primary::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, 
                transparent 30%, 
                rgba(255,255,255,0.12) 50%, 
                transparent 70%
            );
            animation: shimmer 3s ease-in-out infinite;
            background-size: 200% 100%;
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 
                0 14px 48px rgba(0, 212, 255, 0.4),
                0 6px 16px rgba(0, 212, 255, 0.25);
        }
        
        .btn-primary:active {
            transform: translateY(0);
        }
        
        .btn-primary:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        .btn-primary span {
            position: relative;
            z-index: 1;
        }

        /* Waveform canvas container */
        .waveform-container {
            position: relative;
            height: 96px;
            border-radius: 14px;
            overflow: hidden;
            background: linear-gradient(135deg, 
                rgba(10, 11, 16, 0.85) 0%, 
                rgba(18, 20, 28, 0.7) 100%
            );
            border: 1px solid rgba(255, 255, 255, 0.06);
        }
        
        .waveform-container::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, 
                rgba(0, 212, 255, 0.03) 0%, 
                transparent 50%,
                rgba(0, 229, 160, 0.02) 100%
            );
            pointer-events: none;
        }

        /* Premium spinner */
        .spinner-premium {
            width: 40px;
            height: 40px;
            border: 2px solid rgba(0, 212, 255, 0.1);
            border-top-color: #00d4ff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            position: relative;
        }
        
        .spinner-premium::before {
            content: '';
            position: absolute;
            inset: 4px;
            border: 2px solid rgba(0, 229, 160, 0.1);
            border-top-color: #00e5a0;
            border-radius: 50%;
            animation: spin 1.2s linear infinite reverse;
        }

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

        /* Status indicator */
        .status-indicator {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 7px 16px;
            border-radius: 100px;
            font-size: 11px;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            background: rgba(0, 212, 255, 0.08);
            border: 1px solid rgba(0, 212, 255, 0.2);
            color: #00d4ff;
        }
        
        .status-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #00d4ff;
            animation: pulse-soft 2s ease-in-out infinite;
            box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
        }

        /* Toast notification */
        .toast-wrapper {
            position: fixed;
            bottom: 28px;
            right: 28px;
            z-index: 9990;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .toast-item {
            background: linear-gradient(135deg, 
                rgba(24, 27, 38, 0.97) 0%, 
                rgba(18, 20, 28, 0.98) 100%
            );
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            padding: 14px 22px;
            display: flex;
            align-items: center;
            gap: 12px;
            transform: translateX(120%);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
        }
        
        .toast-item.show {
            transform: translateX(0);
            opacity: 1;
        }

        /* History item */
        .history-item {
            background: rgba(20, 24, 34, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            cursor: pointer;
        }
        
        .history-item:hover {
            background: rgba(36, 40, 55, 0.9);
            border-color: rgba(255, 255, 255, 0.12);
            transform: translateX(4px);
        }

        /* Audio controls */
        .audio-btn {
            border-radius: 12px;
            font-weight: 500;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .audio-btn-primary {
            background: rgba(0, 212, 255, 0.1);
            border: 1px solid rgba(0, 212, 255, 0.2);
            color: #00d4ff;
        }
        
        .audio-btn-primary:hover {
            background: rgba(0, 212, 255, 0.15);
            border-color: rgba(0, 212, 255, 0.35);
            box-shadow: 0 0 24px rgba(0, 212, 255, 0.15);
        }
        
        .audio-btn-secondary {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: rgba(190, 195, 210, 0.8);
        }
        
        .audio-btn-secondary:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.14);
            color: rgba(210, 215, 230, 0.95);
        }

        /* Custom scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { 
            background: rgba(255, 255, 255, 0.1); 
            border-radius: 3px; 
        }
        ::-webkit-scrollbar-thumb:hover { 
            background: rgba(255, 255, 255, 0.18); 
        }

        /* Section label */
        .section-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: rgba(180, 188, 210, 0.85);
            font-weight: 500;
        }
        
        .section-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            box-shadow: 0 0 8px currentColor;
        }

        /* Animation delays for stagger effect */
        .delay-100 { animation-delay: 0.1s; }
        .delay-150 { animation-delay: 0.15s; }
        .delay-200 { animation-delay: 0.2s; }
        .delay-250 { animation-delay: 0.25s; }
        .delay-300 { animation-delay: 0.3s; }
        .delay-350 { animation-delay: 0.35s; }
        .delay-400 { animation-delay: 0.4s; }
        .delay-450 { animation-delay: 0.45s; }
        .delay-500 { animation-delay: 0.5s; }

        /* Responsive grid */
        @media (max-width: 768px) {
            .bento-grid {
                grid-template-columns: 1fr !important;
            }
        }

        /* Logo icon glow */
        .logo-glow {
            position: relative;
        }
        
        .logo-glow::after {
            content: '';
            position: absolute;
            inset: -4px;
            background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
            border-radius: inherit;
            filter: blur(8px);
            z-index: -1;
        }

        /* Focus states */
        button:focus-visible, 
        textarea:focus-visible,
        input:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
        }

        /* Audio element */
        audio {
            width: 100%;
            height: 44px;
            border-radius: 10px;
            outline: none;
        }
        
        audio::-webkit-media-controls-panel {
            background: rgba(28, 32, 41, 0.95);
        }
