      :root {
            --primary-color: #28a745;
            --secondary-color: #3a0ca3;
            --success-color: #4cc9f0;
            --warning-color: #f72585;
            --error-color: #dc3545;
            --background-color: #f8f9fa;
            --card-color: #ffffff;
            --text-color: #333333;
            --border-color: #e0e0e0;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --btn-shadow: 0 4px 14px rgba(67, 97, 238, 0.25);
        }



        .calculator-container {
            max-width: 500px;
            margin: 0 auto;
            background: var(--card-color);
            border-radius: 25px;
            padding: 25px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(10px);
        }

        .calculator-header {
            text-align: center;
            margin-bottom: 25px;
        }

        .calculator-title {
            color: var(--primary-color);
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .calculator-description {
            color: #6c757d;
            font-size: 14px;
            line-height: 1.4;
        }

        .display-container {
            background: linear-gradient(135deg, #2c3e50, #34495e);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .display {
            background: transparent;
            border: none;
            color: #ecf0f1;
            font-size: 32px;
            font-weight: 600;
            text-align: right;
            width: 100%;
            min-height: 60px;
            outline: none;
            font-family: 'Courier New', monospace;
            resize: none;
            overflow: hidden;
        }

        .history-display {
            color: #bdc3c7;
            font-size: 16px;
            text-align: right;
            margin-bottom: 10px;
            min-height: 20px;
            font-family: 'Courier New', monospace;
            opacity: 0.8;
        }

        .button-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .calc-btn {
            height: 60px;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            user-select: none;
        }

        .calc-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .calc-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        /* 数字按键 */
        .btn-number {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            color: var(--text-color);
            border: 1px solid var(--border-color);
        }

        .btn-number:hover {
            background: linear-gradient(135deg, #e9ecef, #dee2e6);
        }

        /* 运算符按键 */
        .btn-operator {
            background: linear-gradient(135deg, var(--primary-color), #20c997);
            color: white;
            box-shadow: var(--btn-shadow);
        }

        .btn-operator:hover {
            background: linear-gradient(135deg, #218838, #1fa085);
        }

        /* 函数按键 */
        .btn-function {
            background: linear-gradient(135deg, var(--secondary-color), #5a67d8);
            color: white;
            font-size: 14px;
        }

        .btn-function:hover {
            background: linear-gradient(135deg, #553c9a, #4c51bf);
        }

        /* 特殊按键 */
        .btn-special {
            background: linear-gradient(135deg, var(--warning-color), #ff6b9d);
            color: white;
        }

        .btn-special:hover {
            background: linear-gradient(135deg, #e91e63, #f50057);
        }

        /* 等号按键 */
        .btn-equals {
            background: linear-gradient(135deg, #ff6b35, #f7931e);
            color: white;
            grid-column: span 2;
            font-size: 20px;
        }

        .btn-equals:hover {
            background: linear-gradient(135deg, #ff5722, #ff8f00);
        }

        /* 清除按键 */
        .btn-clear {
            background: linear-gradient(135deg, var(--error-color), #e74c3c);
            color: white;
            grid-column: span 2;
        }

        .btn-clear:hover {
            background: linear-gradient(135deg, #c82333, #dc3545);
        }

        .shortcuts-info {
            background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
            border: 1px solid #c3e6cb;
            border-radius: 10px;
            padding: 15px;
            margin-top: 20px;
            font-size: 13px;
            color: #155724;
        }

        .shortcuts-title {
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .shortcuts-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 5px;
            font-family: monospace;
        }

        .btn-pressed {
            animation: buttonPress 0.1s ease;
        }

        @keyframes buttonPress {
            0% { transform: scale(1); }
            50% { transform: scale(0.95); }
            100% { transform: scale(1); }
        }

        .mode-toggle {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 15px;
        }

        .mode-btn {
            padding: 8px 16px;
            border: 2px solid var(--primary-color);
            border-radius: 20px;
            background: transparent;
            color: var(--primary-color);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .mode-btn.active {
            background: var(--primary-color);
            color: white;
        }

        .error-highlight {
            animation: errorShake 0.5s ease;
            border: 2px solid var(--error-color) !important;
        }

        @keyframes errorShake {
            0%, 20%, 40%, 60%, 80% { transform: translateX(-2px); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(2px); }
        }

        @media (max-width: 768px) {
            .calculator-container {
                margin: 10px;
                padding: 20px;
            }
            
            .button-grid {
                gap: 8px;
            }
            
            .calc-btn {
                height: 50px;
                font-size: 14px;
            }
            
            .display {
                font-size: 24px;
                min-height: 50px;
            }
            
            .shortcuts-grid {
                grid-template-columns: 1fr;
            }
        }