* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0b0e17;
    --bg-card: #141827;
    --bg-section: #0f1220;
    --gold: #c9a84c;
    --gold-light: #e8c96a;
    --gold-dim: rgba(201, 168, 76, 0.15);
    --cream: #e8dcc8;
    --cream-dim: rgba(232, 220, 200, 0.55);
    --border: #242840;
    --border-gold: rgba(201, 168, 76, 0.3);
    --accent: #7b3f6e;
    --accent2: #3a5f7d;
    --checked-opacity: 0.38;
    --radius: 4px;
}

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(123, 63, 110, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(58, 95, 125, 0.06) 0%, transparent 60%);
    color: var(--cream);
    min-height: 100vh;
    padding: 20px 16px 40px;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
}

/* ---- HEADER ---- */

header {
    background: linear-gradient(135deg, #10131f 0%, #1a1030 50%, #10131f 100%);
    border: 1px solid var(--border-gold);
    border-bottom: 2px solid var(--gold);
    padding: 28px 24px 20px;
    text-align: center;
    position: relative;
    margin-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}

header::before {
    content: '— IBA —';
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 0.7rem;
    letter-spacing: 6px;
    color: var(--gold);
    opacity: 0.7;
    margin-bottom: 8px;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.header-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    color: var(--cream-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.version-link {
    position: absolute;
    top: 10px;
    left: 16px;
    font-size: 0.6rem;
    color: rgba(201, 168, 76, 0.4);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.version-link:hover {
    color: var(--gold);
}

.header-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---- STATS ---- */

.stats {
    background: #0d1020;
    border: 1px solid var(--border-gold);
    border-top: none;
    border-bottom: 2px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cream-dim);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--gold);
    line-height: 1;
}

.overall-progress {
    width: 160px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.overall-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

/* ---- MAIN ---- */

main {
    background: var(--bg-section);
    border: 1px solid var(--border-gold);
    border-top: none;
    border-bottom: none;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* ---- CATEGORY ---- */

.category {
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, #1a1530 0%, #12192e 100%);
    border-bottom: 1px solid var(--border-gold);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.category-title-row {
    flex: 1;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--gold-light);
    font-weight: 600;
    letter-spacing: 1px;
}

.category-desc {
    font-size: 0.72rem;
    color: var(--cream-dim);
    letter-spacing: 1px;
    margin-top: 2px;
    text-transform: uppercase;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.progress-label {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 1px;
    white-space: nowrap;
    min-width: 36px;
    text-align: right;
}

.progress-bar {
    width: 100px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ---- COCKTAIL GRID ---- */

.cocktail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
}

/* ---- COCKTAIL CARD ---- */

.cocktail-card {
    background: var(--bg-card);
    padding: 14px 16px;
    cursor: default;
    transition: background 0.15s;
    position: relative;
}

.cocktail-card:hover {
    background: #1c2138;
}

.cocktail-card.checked {
    opacity: var(--checked-opacity);
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 10px;
}

.check-row:hover .cocktail-name {
    color: var(--gold-light);
}

.checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-gold);
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.15s;
    background: transparent;
}

.check-row:hover .checkbox {
    border-color: var(--gold);
}

.checkbox.checked {
    background: var(--gold);
    border-color: var(--gold);
}

.checkbox.checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: 2px solid #0b0e17;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.cocktail-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--cream);
    font-weight: 600;
    line-height: 1.2;
    flex: 1;
    transition: color 0.15s;
}

.cocktail-card.checked .cocktail-name {
    text-decoration: line-through;
    text-decoration-color: var(--gold);
}

.glass-tag {
    font-size: 0.62rem;
    color: var(--cream-dim);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 3px;
    letter-spacing: 0.3px;
}

.cocktail-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 26px;
}

.detail-row {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--cream-dim);
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.detail-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    opacity: 0.8;
    flex-shrink: 0;
    width: 62px;
    padding-top: 1px;
}

.detail-value {
    flex: 1;
    color: rgba(232, 220, 200, 0.6);
}

/* ---- CONTROLS ---- */

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: #0d1020;
    border: 1px solid var(--border-gold);
    border-top: 2px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    flex-wrap: wrap;
}

/* ---- BUTTONS ---- */

.btn {
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 9px 18px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.btn:hover {
    background: var(--gold);
    color: var(--bg);
}

.btn:active {
    transform: scale(0.97);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.65rem;
}

.btn-danger {
    border-color: rgba(200, 80, 80, 0.6);
    color: rgba(200, 80, 80, 0.8);
}

.btn-danger:hover {
    background: rgba(200, 80, 80, 0.8);
    color: var(--cream);
    border-color: transparent;
}

/* ---- TOAST ---- */

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1f35;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 10px 22px;
    font-family: 'Lato', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 100;
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    white-space: nowrap;
}

.hidden {
    display: none !important;
}

/* ---- FOOTER ---- */

footer {
    text-align: center;
    padding: 28px 20px 0;
    font-size: 0.78rem;
    color: rgba(232, 220, 200, 0.3);
    letter-spacing: 0.5px;
}

footer strong {
    color: rgba(201, 168, 76, 0.5);
    font-weight: 400;
}

footer a {
    color: rgba(201, 168, 76, 0.5);
    text-decoration: none;
}

footer a:hover {
    color: var(--gold);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 640px) {
    body {
        padding: 12px 10px 32px;
    }

    header {
        padding: 20px 16px 16px;
    }

    .stats {
        gap: 16px;
        padding: 12px 16px;
    }

    .overall-progress {
        width: 100px;
    }

    main {
        padding: 16px 12px;
        gap: 24px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-progress {
        width: 100%;
    }

    .progress-bar {
        flex: 1;
    }

    .cocktail-grid {
        grid-template-columns: 1fr;
    }

    .header-controls {
        gap: 8px;
    }

    .btn-sm {
        padding: 5px 10px;
    }
}

@media (min-width: 900px) {
    .cocktail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
