/* Updated calculator.css */
/* Made the calculator more compact so the Spotify embed remains visible (or partially visible) on most screens while using the calculator */
/* Reduced overall height by ~30-35% while keeping it fully usable (large touch-friendly buttons, readable display) */

.calculator-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 40px auto;
    padding: 40px 20px;
    background: linear-gradient(180deg, rgba(12, 25, 43, 0.96), rgba(5, 10, 19, 0.98));
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 8px;
    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(0, 229, 255, 0.1);
    text-align: center;
    color: #d7edf7;
}

.calculator-container h1 {
    color: #f7fbff;
    font-size: 2.5em;
    margin: 0 0 20px 0;
    text-shadow: 0 0 18px rgba(0, 229, 255, 0.24);
}

.calculator-container .calculator {
    background: #02060d;
    padding: 25px;
    border: 1px solid rgba(255, 45, 214, 0.32);
    border-radius: 8px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(255, 45, 214, 0.12);
    width: 100%;
    max-width: 500px; /* Slightly constrained for better balance with the embed above */
    box-sizing: border-box;
    margin: 0 auto;
}

.calculator-container .display {
    width: 100%;
    height: 100px;
    background: #08111f;
    margin-bottom: 25px;
    font-size: 50px;
    text-align: right;
    padding: 0 20px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 229, 255, 0.38);
    border-radius: 8px;
    color: #f7fbff;
    box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.12);
}

.calculator-container .buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 85px);
    gap: 15px;
}

.calculator-container button {
    font-size: 36px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 8px;
    background: #101c2f;
    color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.calculator-container button:hover {
    border-color: rgba(0, 229, 255, 0.52);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.16);
}

.calculator-container button:active {
    transform: scale(0.98);
}

.calculator-container .operator {
    background: #1db954;
    color: #03110a;
    border-color: rgba(53, 242, 131, 0.58);
}

.calculator-container .wide {
    grid-column: span 2;
}

.calculator-container .gray {
    background: #243149;
    color: #eaf7ff;
}

@media (max-width: 560px) {
    .calculator-container {
        padding: 28px 12px;
    }

    .calculator-container .calculator {
        padding: 16px;
    }

    .calculator-container .display {
        height: 76px;
        font-size: 36px;
    }

    .calculator-container .buttons {
        grid-template-rows: repeat(5, 64px);
        gap: 10px;
    }

    .calculator-container button {
        font-size: 28px;
    }
}
