* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f7fafc;
    background: #0b1726;
}

.background {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #304f8c 0, #0b1726 55%, #050814 100%);
    opacity: 0.85;
    z-index: -2;
}

.page {
    max-width: 1100px;
    margin: 24px auto 40px;
    padding: 0 16px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.content {
    margin-top: 10px;
}

.layout {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 16px;
}

.layout.single-column {
    grid-template-columns: 1fr;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.beer-panel {
    text-align: center;
}

.countdown {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 8px;
}

.count-box {
    flex: 1;
    background: #e2e8f0;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    color: #1f2937;
}

.count-number {
    font-size: 26px;
    font-weight: 700;
}

.count-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.subtitle {
    margin-top: 10px;
    font-size: 13px;
    color: #cbd5f5;
}

.beer-total {
    font-size: 70px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 4px 0;
    color: #fbbf24;
    text-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
}

.progress-bar {
    position: relative;
    height: 18px;
    border-radius: 999px;
    background: #111827;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #facc15);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
    transition: width 0.4s ease-out;
}

.progress-text {
    margin-top: 6px;
    font-size: 13px;
    color: #e5e7eb;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.05s ease-out, box-shadow 0.1s ease-out, background 0.15s;
}

.btn.primary {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #f9fafb;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    transform: translateY(-1px);
}

.btn.secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn.secondary:hover {
    background: rgba(148, 163, 184, 0.35);
}

.btn.full-width {
    width: 100%;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.add-beer-form input[type="text"],
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    margin-top: 4px;
}

.add-beer-form input::placeholder {
    color: #9ca3af;
}

.add-beer-form .note-label {
    display: block;
    font-size: 13px;
    color: #cbd5f5;
}

.logs {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    font-size: 13px;
}

.logs li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.log-date {
    color: #9ca3af;
}

.log-count {
    font-weight: 600;
    color: #fbbf24;
}

.log-note {
    color: #e5e7eb;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.back-link {
    margin-top: 10px;
}

.back-link a {
    color: #93c5fd;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.flash-container {
    margin-bottom: 10px;
}

.flash {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.flash.success {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.6);
}

.flash.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.7);
}

.footer {
    margin-top: 24px;
    font-size: 12px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .beer-total {
        font-size: 56px;
    }
}

