
    .calc-widget-container {
        --primary-dark: #1a2332;
        --primary-navy: #2c3e50;
        --accent-green: #27ae60;
        --accent-green-dark: #1e8449;
        --accent-orange: #e67e22;
        --accent-red: #c0392b;
        --accent-blue: #2980b9;
        --bg-light: #ecf0f1;
        --bg-white: #ffffff;
        --text-dark: #2c3e50;
        --text-light: #7f8c8d;
        --border-color: #bdc3c7;
        --shadow-soft: 0 2px 10px rgba(0,0,0,0.1);
        --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
        --transition-fast: 0.15s ease;
        --font-numbers: 'Segoe UI', 'Arial', sans-serif;
        font-family: 'Segoe UI', Tahoma, sans-serif;
        direction: rtl;
    }

    .calc-widget-container * {
        box-sizing: border-box;
    }

    .calculator-wrapper {
        display: flex;
        gap: 20px;
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
        padding: 20px;
    }

    .calculator {
        background: var(--primary-dark);
        border-radius: 20px;
        padding: 25px;
        box-shadow: var(--shadow-medium);
        width: 420px;
        flex-shrink: 0;
    }

    .calc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .calc-title {
        color: var(--bg-white);
        font-size: 14px;
        font-weight: 600;
    }

    .settings-row {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 15px;
    }

    .setting-group {
        display: flex;
        align-items: center;
        gap: 5px;
        background: rgba(255,255,255,0.1);
        padding: 5px 10px;
        border-radius: 8px;
    }

    .setting-label {
        color: var(--text-light);
        font-size: 11px;
    }

    .setting-select {
        background: var(--primary-navy);
        color: white;
        border: none;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        cursor: pointer;
    }

    .tax-input {
        width: 50px;
        background: var(--primary-navy);
        color: white;
        border: none;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        text-align: center;
    }

    .display-panel {
        background: #0a1628;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 15px;
        border: 1px solid rgba(255,255,255,0.1);
    }

    .indicators {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .indicator {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 3px;
        background: rgba(255,255,255,0.1);
        color: var(--text-light);
        transition: var(--transition-fast);
    }

    .indicator.active {
        background: var(--accent-green);
        color: white;
    }

    .expression-line {
        color: var(--text-light);
        font-size: 14px;
        text-align: left;
        direction: ltr;
        min-height: 20px;
        margin-bottom: 5px;
        font-family: var(--font-numbers);
        overflow-x: auto;
        white-space: nowrap;
    }

    .main-display {
        color: white;
        font-size: 36px;
        text-align: left;
        direction: ltr;
        font-family: var(--font-numbers);
        font-weight: 300;
        overflow-x: auto;
        white-space: nowrap;
        min-height: 45px;
        display: flex;
        align-items: center;
    }

    .main-display.error {
        color: var(--accent-red);
        font-size: 24px;
    }

    .button-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .calc-widget-container .btn {
        padding: 16px 8px;
        border: none;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all var(--transition-fast);
        font-family: var(--font-numbers);
        position: relative;
        overflow: hidden;
    }

    .calc-widget-container .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .calc-widget-container .btn:active {
        transform: translateY(0);
    }

    .btn-number {
        background: var(--primary-navy);
        color: white;
    }

    .btn-number:hover {
        background: #34495e;
    }

    .btn-operator {
        background: var(--accent-orange);
        color: white;
    }

    .btn-operator:hover {
        background: #d35400;
    }

    .btn-operator.active {
        background: white;
        color: var(--accent-orange);
    }

    .btn-function {
        background: #3d5a73;
        color: white;
    }

    .btn-function:hover {
        background: #4a6d8c;
    }

    .btn-memory {
        background: var(--accent-blue);
        color: white;
        font-size: 12px;
    }

    .btn-memory:hover {
        background: #3498db;
    }

    .btn-tax {
        background: var(--accent-green);
        color: white;
        font-size: 12px;
    }

    .btn-tax:hover {
        background: var(--accent-green-dark);
    }

    .btn-clear {
        background: var(--accent-red);
        color: white;
    }

    .btn-clear:hover {
        background: #e74c3c;
    }

    .btn-equals {
        background: var(--accent-green);
        color: white;
        grid-row: span 2;
    }

    .btn-equals:hover {
        background: var(--accent-green-dark);
    }

    .btn-zero {
        grid-column: span 2;
    }

    .btn-gt {
        background: #8e44ad;
        color: white;
    }

    .btn-gt:hover {
        background: #9b59b6;
    }

    .history-panel {
        background: var(--bg-white);
        border-radius: 20px;
        padding: 20px;
        flex: 1;
        max-width: 350px;
        display: flex;
        flex-direction: column;
        max-height: 700px;
    }

    .history-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--bg-light);
    }

    .history-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-dark);
    }

    .history-clear {
        background: var(--accent-red);
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
        cursor: pointer;
        transition: var(--transition-fast);
    }

    .history-clear:hover {
        background: #e74c3c;
    }

    .history-list {
        flex: 1;
        overflow-y: auto;
        padding-right: 10px;
    }

    .history-item {
        background: var(--bg-light);
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 10px;
        cursor: pointer;
        transition: var(--transition-fast);
        position: relative;
    }

    .history-item:hover {
        background: #d5dbdb;
        transform: translateX(-5px);
    }

    .history-expression {
        font-size: 13px;
        color: var(--text-light);
        margin-bottom: 5px;
        direction: ltr;
        text-align: left;
        font-family: var(--font-numbers);
    }

    .history-result {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-dark);
        direction: ltr;
        text-align: left;
        font-family: var(--font-numbers);
    }

    .history-time {
        font-size: 10px;
        color: var(--text-light);
        position: absolute;
        top: 8px;
        left: 10px;
    }

    .history-delete {
        position: absolute;
        top: 8px;
        right: 10px;
        background: var(--accent-red);
        color: white;
        border: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        font-size: 12px;
        cursor: pointer;
        opacity: 0;
        transition: var(--transition-fast);
    }

    .history-item:hover .history-delete {
        opacity: 1;
    }

    .no-history {
        text-align: center;
        color: var(--text-light);
        padding: 40px 20px;
    }

    .mode-buttons {
        display: flex;
        gap: 8px;
        margin-bottom: 15px;
    }

    .mode-btn {
        flex: 1;
        padding: 10px;
        border: none;
        border-radius: 8px;
        font-size: 12px;
        cursor: pointer;
        transition: var(--transition-fast);
        background: rgba(255,255,255,0.1);
        color: var(--text-light);
    }

    .mode-btn:hover {
        background: rgba(255,255,255,0.2);
    }

    .mode-btn.active {
        background: var(--accent-green);
        color: white;
    }

    @media (max-width: 900px) {
        .calculator-wrapper {
            flex-direction: column;
            align-items: center;
        }

        .history-panel {
            max-width: 420px;
            width: 100%;
            max-height: 300px;
        }
    }

    @media (max-width: 480px) {
        .calculator {
            width: 100%;
            padding: 15px;
        }

        .main-display {
            font-size: 28px;
        }

        .calc-widget-container .btn {
            padding: 14px 6px;
            font-size: 13px;
        }

        .settings-row {
            flex-direction: column;
        }
    }

    .calc-widget-container .btn:focus {
        outline: 2px solid var(--accent-green);
        outline-offset: 2px;
    }

    .calc-widget-container .btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255,255,255,0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s;
    }

    .calc-widget-container .btn:active::after {
        width: 200px;
        height: 200px;
    }
