        :root {
            --bg-color: #0f172a;
            --card-bg: #1e293b;
            --accent-tax: #3498db;
            --accent-green: #10b981;
            --accent-orange: #f59e0b;
            --accent-red: #ef4444;
            --text-main: #f8fafc;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            touch-action: manipulation;
            overflow: hidden;
        }

        .main-wrapper {
            display: flex;
            gap: 20px;
            width: 95%;
            max-width: 900px;
            height: 85vh;
        }

        .calc-section {
            flex: 1.5;
            background: var(--card-bg);
            padding: 25px;
            border-radius: 24px;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
            display: flex;
            flex-direction: column;
        }

        .display-wrapper {
            background: #000;
            border-radius: 12px;
            border: 2px solid #334155;
            margin-bottom: 20px;
            padding: 0 15px;
            display: flex;
            align-items: center;
            height: 90px;
        }

        #display {
            width: 100%;
            font-size: 2rem;
            text-align: right;
            background: transparent;
            border: none;
            color: #fff;
            font-family: 'Consolas', monospace;
            outline: none;
        }

        .tax-bar {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-bottom: 15px;
        }

        .tax-btn {
            padding: 12px 2px;
            border-radius: 10px;
            border: none;
            background: var(--accent-tax);
            color: white;
            font-weight: bold;
            font-size: 0.85rem;
            cursor: pointer;
        }

        .tax-btn.off { background: #475569; }

        .buttons-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            flex-grow: 1;
        }

        button {
            font-size: 1.8rem;
            border: none;
            border-radius: 16px;
            cursor: pointer;
            background: #334155;
            color: white;
            transition: background 0.1s, transform 0.05s;
        }

        button:active { transform: scale(0.92); }
        .btn-op { background: var(--accent-orange); font-weight: bold; }
        .btn-ac { background: var(--accent-red); font-weight: bold; }
        .btn-equal { background: var(--accent-green); grid-column: span 2; font-size: 2.5rem; }

        .history-section {
            flex: 1;
            background: rgba(30, 41, 59, 0.4);
            padding: 20px;
            border-radius: 24px;
            display: flex;
            flex-direction: column;
            border: 1px solid #334155;
            overflow: hidden;
        }

        .history-list {
            flex-grow: 1;
            overflow-y: auto;
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .history-item {
            padding: 12px;
            border-bottom: 1px solid #334155;
            font-family: monospace;
            color: #94a3b8;
            cursor: pointer;
            font-size: 1rem;
            word-break: break-all;
        }

        .history-item:hover { color: #fff; background: #475569; }

        @media (max-width: 768px) {
            .main-wrapper { flex-direction: column; height: 100vh; padding: 10px; }
            .calc-section { flex: 2; }
            .history-section { flex: 1; }
            #display { font-size: 2.5rem; }
            body { overflow: auto; }
        }