/* Windows 11 Calculator Style */
.calculator-section {
    padding: 4rem 0;
    text-align: center;
}

.hidden-calc {
    display: none !important;
}

/* Wrapper animation */
.calculator-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    animation: calcFadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes calcFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Main Container - Mica / Acrylic Effect */
.calculator-container {
    width: 340px;
    background: rgba(32, 32, 32, 0.85);
    /* Dark base */
    backdrop-filter: blur(20px) saturate(125%);
    /* Acrylic effect */
    -webkit-backdrop-filter: blur(20px) saturate(125%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Glass border */
    border-radius: 8px;
    /* Win11 standard corner radius */
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.2);
    /* Depth shadow */
    padding: 4px;
    font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Header (Hamburger, etc - optional visual) */
.calc-header-visual {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.9rem;
}

.calc-header-visual span {
    opacity: 0.7;
}

/* Display Area */
.calc-screen {
    text-align: right;
    padding: 10px 16px 20px 16px;
    margin-bottom: 2px;
}

.calc-history {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    min-height: 1.5rem;
    margin-bottom: 4px;
    font-weight: 400;
}

.calc-display {
    color: #fff;
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.1;
    overflow-x: auto;
    white-space: nowrap;
    letter-spacing: -1px;
    padding-bottom: 5px;
}

.calc-display::-webkit-scrollbar {
    height: 2px;
}

.calc-display::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Button Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 2px;
    /* Small gap characteristic of Win11 */
}

/* Buttons */
.calc-btn {
    border: none;
    border-radius: 4px;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-color 0.1s;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    /* Very subtle fill */
    color: #fff;
    font-weight: 400;
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    /* Hover state */
}

.calc-btn:active {
    background: rgba(255, 255, 255, 0.03);
    /* Active press */
    transform: scale(0.98);
}

/* Styles for specific button types */
.calc-btn.number {
    background: rgba(255, 255, 255, 0.06);
    /* Number keys slightly lighter background */
    font-weight: 600;
}

.calc-btn.number:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calc-btn.operator {
    background: rgba(255, 255, 255, 0.03);
    /* Operators */
    font-size: 1.4rem;
    font-weight: 300;
}

.calc-btn.function {
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
    font-style: italic;
    /* Just for style differentiation */
}

/* Equals Button - Accent Color */
.calc-btn.equals {
    background: var(--accent-color, #d4af37);
    /* Gold/Accent */
    color: #000;
    font-weight: 600;
}

.calc-btn.equals:hover {
    background: var(--accent-secondary, #b8860b);
    color: #fff;
}