:root {
    color-scheme: dark;
    font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    background: #0f172a;
    color: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 25%),
        linear-gradient(180deg, #020617 0%, #0f172a 60%);
}

.calculator-app {
    width: min(520px, 100%);
    padding: 1rem;
}

.calculator-card {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
    padding: 0.9rem;
}

.calculator-brand {
    text-align: center;
    margin-bottom: 0.6rem;
}

.calculator-brand h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    letter-spacing: -0.05em;
}

.calculator-brand p {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.display-panel {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 0.7rem;
    margin-bottom: 0.7rem;
    display: grid;
    gap: 0.25rem;
}

.lcd-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #94a3b8;
}

.result {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    text-align: right;
    letter-spacing: 0.02em;
    color: #00FF00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.denomination-card {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 0.5rem;
    display: grid;
    gap: 0.2rem;
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr 1.15fr;
    gap: 0.55rem;
    align-items: center;
}

.table-header {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 0.4rem;
}

.table-row {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.table-row:last-child {
    border-bottom: none;
}

.denom-label {
    font-size: 0.85rem;
    color: #e2e8f0;
}

.cell-placeholder {
    display: inline-flex;
    justify-content: center;
    color: #94a3b8;
}

input {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.4rem 0.5rem;
    font: inherit;
    font-size: 0.8rem;
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
    background: rgba(30, 41, 59, 0.95);
    text-align: right;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

input:focus {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
    background: rgba(30, 41, 59, 0.98);
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.print-btn {
    margin-top: 0.8rem;
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

.print-btn:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.print-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.add-btn {
    background: transparent;
    color: #3b82f6;
    border: 1px dashed #3b82f6;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}
.add-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}
.remove-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: none;
    border-radius: 6px;
    padding: 0.2rem 0;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.remove-btn:hover {
    background: rgba(239, 68, 68, 0.4);
}

@media (max-width: 520px) {
    .calculator-card {
        padding: 1rem;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1.2fr 0.9fr 1.2fr;
    }
}