
/* Scientific Calculator Modern Design */
.scientific-calculator-card {
    border-radius: 25px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
    border: none;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
}

.scientific-calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.scientific-calculator-card:hover::before {
    opacity: 1;
}

.scientific-calculator-card .card-body {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

/* Display Area */
.calculator-display {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    box-shadow: 
        inset 0 4px 20px rgba(0,0,0,0.4),
        0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid rgba(74, 144, 226, 0.3);
    margin-bottom: 25px;
}

.display-info {
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.memory-indicator, .angle-mode-indicator {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.display-input {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a2e 100%);
    border: 3px solid #4a90e2;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 800;
    text-align: right;
    box-shadow: 
        0 6px 20px rgba(74, 144, 226, 0.4),
        inset 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    padding: 20px 25px;
    border-radius: 15px;
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.display-input:focus {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f1419 100%);
    border-color: #ff6b6b;
    box-shadow: 
        0 0 30px rgba(255, 107, 107, 0.5),
        inset 0 2px 10px rgba(0,0,0,0.3);
    color: #ffffff;
    outline: none;
    transform: scale(1.02);
}

.history-display {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 18px;
    max-height: 140px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;
    font-size: 0.9rem;
    color: #e1e5e9;
    line-height: 1.7;
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}

.history-display::-webkit-scrollbar {
    width: 8px;
}

.history-display::-webkit-scrollbar-track {
    background: rgba(74, 144, 226, 0.1);
    border-radius: 4px;
}

.history-display::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-display::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #357abd, #2c5aa0);
}

/* Button Styling */
.calculator-buttons .btn {
    height: 65px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 15px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.calculator-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.calculator-buttons .btn:hover::before {
    left: 100%;
}

.calculator-buttons .btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.calculator-buttons .btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Number buttons */
.btn-outline-primary {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-color: #357abd;
    color: white;
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #357abd, #2c5aa0);
    color: white;
    border-color: #2c5aa0;
    box-shadow: 0 12px 35px rgba(44, 90, 160, 0.5);
}

/* Operator buttons */
.btn-outline-warning {
    background: linear-gradient(135deg, #ff9500, #ff8000);
    border-color: #ff8000;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.btn-outline-warning:hover {
    background: linear-gradient(135deg, #ff8000, #e6730d);
    color: white;
    border-color: #e6730d;
    box-shadow: 0 12px 35px rgba(230, 115, 13, 0.5);
}

/* Function buttons */
.btn-outline-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-color: #138496;
    color: white;
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-outline-info:hover {
    background: linear-gradient(135deg, #138496, #0f6674);
    color: white;
    border-color: #0f6674;
    box-shadow: 0 12px 35px rgba(15, 102, 116, 0.5);
}

/* Scientific function buttons */
.btn-outline-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #1e7e34;
    color: white;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    color: white;
    border-color: #155724;
    box-shadow: 0 12px 35px rgba(21, 87, 36, 0.5);
}

/* Secondary function buttons */
.btn-outline-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border-color: #545b62;
    color: white;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #545b62, #3d4449);
    color: white;
    border-color: #3d4449;
    box-shadow: 0 12px 35px rgba(61, 68, 73, 0.5);
}

/* Danger buttons (clear) */
.btn-outline-danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    border-color: #bd2130;
    color: white;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #bd2130, #a02622);
    color: white;
    border-color: #a02622;
    box-shadow: 0 12px 35px rgba(160, 38, 34, 0.5);
}

/* Equals button */
.btn-success {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-color: #ee5a52;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    font-weight: 800;
    font-size: 1.5rem;
}

.btn-success:hover {
    background: linear-gradient(135deg, #ee5a52, #dc4c47);
    color: white;
    border-color: #dc4c47;
    box-shadow: 0 12px 35px rgba(220, 76, 71, 0.5);
}

/* Button text positioning */
.calculator-buttons .btn * {
    position: relative;
    z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calculator-buttons .btn {
        height: 55px;
        font-size: 1rem;
    }
    
    .display-input {
        font-size: 2.5rem;
        padding: 15px 20px;
    }
    
    .scientific-calculator-card {
        border-radius: 20px;
    }
    
    .calculator-display {
        padding: 20px;
        border-radius: 15px;
    }
}

@media (max-width: 576px) {
    .calculator-buttons .btn {
        height: 50px;
        font-size: 0.9rem;
    }
    
    .display-input {
        font-size: 2rem;
        padding: 12px 15px;
    }
    
    .scientific-calculator-card {
        border-radius: 15px;
    }
    
    .calculator-display {
        padding: 15px;
        border-radius: 12px;
    }
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scientific-calculator-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Button press animation */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.calculator-buttons .btn:active {
    animation: buttonPress 0.1s ease;
}

/* Focus styles for accessibility */
.calculator-buttons .btn:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    outline: none;
}

.calculator-buttons .btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Glass morphism effect enhancement */
.card-body {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
