/* Scientific Calculator Styles */

.sci-calculator-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sci-calculator {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

/* Light Theme */
.sci-calculator-wrapper[data-theme="light"] .sci-calculator {
    background: linear-gradient(145deg, #f5f7fa, #e8ecef);
}

/* Display Section */
.calculator-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 80px;
}

.sci-calculator-wrapper[data-theme="light"] .calculator-display {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.display-history {
    color: #95a5a6;
    font-size: 14px;
    min-height: 20px;
    text-align: right;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sci-calculator-wrapper[data-theme="light"] .display-history {
    color: #7f8c8d;
}

.display-main {
    width: 100%;
    background: transparent;
    border: none;
    color: #ecf0f1;
    font-size: 32px;
    font-weight: 500;
    text-align: right;
    outline: none;
    cursor: default;
}

.sci-calculator-wrapper[data-theme="light"] .display-main {
    color: #2c3e50;
}

/* Button Grid */
.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* Base Button Styles */
.btn {
    background: linear-gradient(145deg, #3d5a80, #2c3e50);
    border: none;
    border-radius: 10px;
    color: #ecf0f1;
    font-size: 18px;
    font-weight: 500;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sci-calculator-wrapper[data-theme="light"] .btn {
    background: linear-gradient(145deg, #ffffff, #e8ecef);
    color: #2c3e50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

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

/* Number Buttons */
.btn-number {
    background: linear-gradient(145deg, #4a6fa5, #34495e);
    font-size: 20px;
}

.sci-calculator-wrapper[data-theme="light"] .btn-number {
    background: linear-gradient(145deg, #ffffff, #f0f3f5);
}

.btn-number:hover {
    background: linear-gradient(145deg, #5a7fb5, #3a5a7e);
}

.sci-calculator-wrapper[data-theme="light"] .btn-number:hover {
    background: linear-gradient(145deg, #f8f9fa, #e0e5e8);
}

/* Operator Buttons */
.btn-operator {
    background: linear-gradient(145deg, #e67e22, #d35400);
    color: #fff;
    font-weight: 600;
}

.sci-calculator-wrapper[data-theme="light"] .btn-operator {
    background: linear-gradient(145deg, #3498db, #2980b9);
}

.btn-operator:hover {
    background: linear-gradient(145deg, #f39c12, #e67e22);
}

.sci-calculator-wrapper[data-theme="light"] .btn-operator:hover {
    background: linear-gradient(145deg, #5dade2, #3498db);
}

/* Function Buttons */
.btn-function {
    background: linear-gradient(145deg, #8e44ad, #6c3483);
    color: #fff;
    font-size: 16px;
}

.sci-calculator-wrapper[data-theme="light"] .btn-function {
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
}

.btn-function:hover {
    background: linear-gradient(145deg, #9b59b6, #7d3c98);
}

.sci-calculator-wrapper[data-theme="light"] .btn-function:hover {
    background: linear-gradient(145deg, #af7ac5, #9b59b6);
}

/* Clear Button */
.btn-clear {
    background: linear-gradient(145deg, #c0392b, #a93226);
    color: #fff;
    font-weight: 600;
}

.sci-calculator-wrapper[data-theme="light"] .btn-clear {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
}

.btn-clear:hover {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
}

.sci-calculator-wrapper[data-theme="light"] .btn-clear:hover {
    background: linear-gradient(145deg, #ec7063, #e74c3c);
}

/* Equals Button */
.btn-equals {
    background: linear-gradient(145deg, #27ae60, #229954);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.sci-calculator-wrapper[data-theme="light"] .btn-equals {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
}

.btn-equals:hover {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
}

.sci-calculator-wrapper[data-theme="light"] .btn-equals:hover {
    background: linear-gradient(145deg, #58d68d, #2ecc71);
}

/* Responsive Design */
@media (max-width: 600px) {
    .sci-calculator {
        padding: 15px;
    }
    
    .btn {
        padding: 12px;
        font-size: 16px;
    }
    
    .btn-number {
        font-size: 18px;
    }
    
    .btn-equals {
        font-size: 20px;
    }
    
    .display-main {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .calculator-buttons {
        gap: 8px;
    }
    
    .btn {
        padding: 10px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .btn-function {
        font-size: 13px;
    }
}