
        :root {
            --spacex-black: #0a0a0a;
            --spacex-dark-gray: #12121e;
            --spacex-blue: #00d4ff;
            --spacex-orange: #ff6b35;
            --spacex-white: #f8f9fa;
            --glow-blue: 0 0 15px 5px rgba(0, 212, 255, 0.4); 
            --glow-orange: 0 0 15px 5px rgba(255, 107, 53, 0.4);
        }

        body {
            background: radial-gradient(ellipse at center, #01040f 0%, #101826 60%, #16213e 100%);
            color: var(--spacex-white);
            font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            overflow-x: hidden;
            position: relative;
        }

        #particle-container {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
        }
        .star {
            position: absolute;
            width: 1px;
            height: 1px;
            background: white;
            border-radius: 50%;
            animation: twinkle 4s infinite alternate;
        }
        .rocket-trail {
            position: absolute;
            width: 2px;
            height: 30px;
            background: linear-gradient(to top, var(--spacex-orange), transparent);
            animation: rocket-launch 6s linear infinite;
        }
        @keyframes twinkle {
            0% { opacity: 0.3; transform: scale(0.8); }
            50% { opacity: 1; transform: scale(1.5); }
            100% { opacity: 0.3; transform: scale(0.8); }
        }
        @keyframes rocket-launch {
            0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 1; }
            100% { transform: translateY(-100px) translateX(50px) rotate(5deg); opacity: 0; }
        }

        .calculator-container {
            background: rgba(10, 10, 10, 0.95);
            backdrop-filter: blur(15px);
            border: 2px solid var(--spacex-blue);
            border-radius: 25px;
            box-shadow: var(--glow-blue), inset 0 0 40px rgba(0, 212, 255, 0.15);
            padding: 2rem;
            max-width: 500px;
            width: 100%;
            position: relative;
            z-index: 10;
        }

        .header {
            text-align: center;
            margin-bottom: 2rem;
        }
        .title {
            font-size: 2.2rem;
            font-weight: 900;
            letter-spacing: 2px;
            text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
            background: linear-gradient(135deg, var(--spacex-blue), var(--spacex-orange));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.25rem;
        }
        .subtitle {
            font-size: 0.95rem;
            color: #888;
            font-weight: 500;
            letter-spacing: 1px;
        }
        .attribution {
            font-size: 0.75rem;
            color: #444;
            margin-top: 0.5rem;
        }

        .modes {
            display: flex;
            justify-content: space-around;
            margin-bottom: 1.5rem;
            gap: 0.75rem;
        }
        .mode-btn {
            padding: 0.5rem 1rem;
            font-size: 0.85rem;
            border-radius: 20px;
            background: rgba(0, 212, 255, 0.05);
            border: 1px solid var(--spacex-blue);
            color: var(--spacex-white);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .mode-btn.active {
            background: var(--spacex-blue);
            color: var(--spacex-black);
            font-weight: 700;
            box-shadow: var(--glow-blue);
        }
        .mode-btn:hover:not(.active) {
            background: rgba(0, 212, 255, 0.2);
        }

        .display {
            background: rgba(18, 18, 30, 0.9);
            border: 2px solid var(--spacex-blue);
            border-radius: 15px;
            padding: 1.2rem 1.5rem;
            margin-bottom: 1.5rem;
            font-size: 2.5rem;
            text-align: right;
            min-height: 4rem;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            overflow: hidden;
            box-shadow: inset 0 0 15px rgba(0, 212, 255, 0.4);
            color: var(--spacex-white);
            font-family: 'Courier Prime', monospace;
        }

        .button-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0.9rem;
            margin-bottom: 1rem;
        }
        .button-grid.basic {
            grid-template-columns: repeat(4, 1fr);
        }

        .btn {
            background: var(--spacex-dark-gray);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            color: var(--spacex-white);
            font-size: 1.1rem;
            font-weight: 500;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
            touch-action: manipulation;
            min-height: 55px;
        }
        .btn:hover {
            border-color: var(--spacex-blue);
            box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
            transform: translateY(-1px);
        }
        .btn:active {
            transform: translateY(1px);
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
        }

        .btn-number {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
        }
        .btn-number:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        .btn-operator {
            background: linear-gradient(135deg, var(--spacex-orange), #ff8c42);
            color: var(--spacex-black);
            font-weight: 700;
            font-size: 1.2rem;
        }
        .btn-operator:hover {
            box-shadow: var(--glow-orange);
            background: linear-gradient(135deg, #ff8c42, var(--spacex-orange));
        }

        .btn-function {
            font-size: 0.9rem;
            background: rgba(0, 212, 255, 0.1);
            border-color: var(--spacex-blue);
        }
        .btn-function:hover {
            background: var(--spacex-blue);
            color: var(--spacex-black);
        }

        .btn-orbital {
            background: linear-gradient(135deg, var(--spacex-blue), #00aaff);
            color: var(--spacex-black);
            font-size: 0.85rem;
            font-weight: 700;
        }
        .btn-orbital:hover {
            box-shadow: var(--glow-blue);
        }

        .btn-equals {
            background: linear-gradient(135deg, var(--spacex-blue), #00aaff);
            color: var(--spacex-black);
            font-weight: 900;
            font-size: 1.5rem;
            grid-column: span 2 / span 2;
            min-height: 55px;
        }
        .btn-equals:hover {
            box-shadow: var(--glow-blue);
            transform: scale(1.05) translateY(-2px);
        }

        .btn-zero {
            grid-column: span 2;
        }

        .controls {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0.9rem;
            margin-bottom: 0.9rem;
        }
        .control-btn {
            padding: 0.6rem;
            font-size: 0.9rem;
            border-radius: 10px;
        }

        .history-panel {
            background: rgba(18, 18, 30, 0.95);
            border: 1px solid var(--spacex-blue);
            border-radius: 15px;
            padding: 1.2rem;
            max-height: 250px;
            overflow-y: auto;
            margin-top: 1.5rem;
            display: none;
            box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.2);
        }
        .history-item {
            padding: 0.6rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            cursor: pointer;
            transition: background 0.2s ease;
            font-size: 0.9rem;
        }
        .history-item:hover {
            background: rgba(0, 212, 255, 0.1);
        }

        .theme-toggle {
            position: fixed;
            top: 1rem;
            right: 1rem;
            background: var(--spacex-dark-gray);
            border: 2px solid var(--spacex-blue);
            color: var(--spacex-white);
            padding: 0.6rem 1.2rem;
            border-radius: 25px;
            cursor: pointer;
            z-index: 20;
            transition: all 0.3s ease;
            font-size: 1.1rem;
        }
        .theme-toggle:hover {
            box-shadow: var(--glow-blue);
            background: var(--spacex-blue);
            color: var(--spacex-black);
        }

        @media (max-width: 480px) {
            .calculator-container {
                padding: 1rem;
                margin: 0.5rem;
            }
            .title {
                font-size: 1.6rem;
            }
            .display {
                font-size: 1.8rem;
                padding: 0.75rem;
            }
            .btn {
                padding: 0.6rem;
                font-size: 0.9rem;
                min-height: 48px;
            }
            .button-grid, .controls {
                gap: 0.6rem;
            }
        }

        body.light {
            background: linear-gradient(135deg, #e9ecef 0%, #ffffff 100%);
            color: #212529;
        }
        body.light .calculator-container {
            background: rgba(255, 255, 255, 0.98);
            border-color: #adb5bd;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 0 15px rgba(0,0,0,0.05);
            color: #212529;
        }
        body.light .display {
            background: #f8f9fa;
            border-color: #dee2e6;
            color: #212529;
            box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
        }
        body.light .btn {
            background: #fff;
            color: #495057;
            border-color: #e9ecef;
        }
        body.light .btn:hover {
            background: #f1f3f5;
            border-color: var(--spacex-blue);
            box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
        }
        body.light .btn-operator, body.light .btn-orbital {
            color: #212529;
        }
        body.light .theme-toggle {
            background: #fff;
            color: #212529;
            border-color: #adb5bd;
        }
        body.light .history-panel {
            background: rgba(255, 255, 255, 0.98);
            border-color: #dee2e6;
        }
