/* style.css */
:root {
    --primary: #7289DA;
    --primary-hover: #5b6eae;
    --background: #36393f;
    --surface: #2f3136;
    --text: #ffffff;
    --text-secondary: #b9bbbe;
    --border: #202225;
    --glass: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: all 0.3s ease;
}

.calculator-container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    position: relative;
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.icon-button {
    background: var(--surface);
    border: none;
    color: var(--text);
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-button:hover {
    background: var(--primary);
}

.output {
    background: var(--surface);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: right;
}

#result {
    background: none;
    border: none;
    color: var(--text);
    font-size: 2.5rem;
    width: 100%;
    text-align: right;
}

.expression-preview {
    color: var(--text-secondary);
    font-size: 1rem;
    min-height: 1.5rem;
}

.keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.button {
    padding: 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text);
}

.button:hover {
    filter: brightness(1.2);
}

.num {
    background: var(--primary);
}

.op {
    background: #4e5d94;
}

.sci {
    background: #404b76;
}

.control {
    background: #2c2f33;
}

.eq {
    background: var(--primary-hover);
}

.calc-history {
    position: absolute;
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
    width: 100%;
    margin-top: 1rem;
}

/* Light Mode Overrides */
body.light-mode {
    --primary: #4b91e2;
    --primary-hover: #3578c6;
    --background: #f1f1f1;
    --surface: #ffffff;
    --text: #000000;
    --text-secondary: #444444;
    --border: #cccccc;
    --glass: rgba(0, 0, 0, 0.05);
}

body.light-mode .icon-button:hover {
    background: var(--primary);
}

@media (max-width: 768px) {
    .calculator-container {
        width: 90%;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .calculator-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .output {
        padding: 0.75rem;
    }

    #result {
        font-size: 2rem;
    }

    .expression-preview {
        font-size: 0.9rem;
    }

    .keys {
        gap: 0.4rem;
    }

    .button {
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 6px;
    }

    .calc-history {
        font-size: 0.9rem;
    }
}

