body {
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
}

.container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

h1 {
    margin-top: 0;
    color: #333;
}

.tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    flex-grow: 1;
    padding: 10px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
    color: #888;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    font-weight: bold;
}

.calculator-content {
    display: none;
}

.calculator-content.active {
    display: block;
}

.display input {
    width: 100%;
    height: 70px;
    border: none;
    background-color: #f3f3f3;
    border-radius: 10px;
    text-align: left;
    padding: 0 20px;
    font-size: 32px;
    box-sizing: border-box;
    margin-bottom: 15px;
    color: #333;
    letter-spacing: 1px;
    caret-color: transparent;
    cursor: text;
}

.description-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
    background-color: #f9f9f9;
}

.buttons.scientific {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.buttons button {
    height: 60px;
    border-radius: 10px;
    border: none;
    font-size: 20px;
    cursor: pointer;
    background-color: #e9e9e9;
    transition: background-color 0.2s;
}

.buttons button:hover {
    background-color: #dcdcdc;
}

.buttons .operator { background-color: #ff9500; color: white; }
.buttons .operator:hover { background-color: #e08300; }
.buttons .adv-operator { background-color: #6c757d; color: white; }
.buttons .adv-operator:hover { background-color: #5a6268; }
.buttons .equal { background-color: #007bff; color: white; grid-row: span 2; }
.buttons .equal:hover { background-color: #0069d9; }
.buttons .zero { grid-column: span 2; }

#average-calc input, #profit-loss-calc input, #split-calc input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
}

.calc-btn {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.2s;
}

.calc-btn:hover {
    background-color: #218838;
}

.result {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    min-height: 70px;
    line-height: 1.7;
    text-align: right;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.result .profit { color: #28a745; }
.result .loss { color: #dc3545; }