/* Wine Scout - Dark Cellar Theme */

:root {
    /* Core palette */
    --bg-deep: #0f0f12;
    --bg-card: #1a1a1f;
    --bg-elevated: #242429;
    --bg-hover: #2a2a30;

    /* Wine accent */
    --wine-primary: #8b2942;
    --wine-light: #a83a55;
    --wine-glow: rgba(139, 41, 66, 0.3);

    /* Gold accent */
    --gold: #d4a537;
    --gold-bright: #f0c14b;
    --gold-glow: rgba(212, 165, 55, 0.25);

    /* Text hierarchy */
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;

    /* Status colors */
    --exceptional: #d4a537;
    --acceptable: #4ade80;
    --poor: #6e6e73;

    /* Borders & shadows */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

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

.hidden {
    display: none !important;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Header
   ============================================ */

header {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-deep) 100%);
    padding: 1rem 1rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

/* User menu */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wine-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-avatar:hover {
    background: var(--wine-light);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    min-width: 180px;
    box-shadow: var(--shadow-elevated);
    display: none;
    z-index: 200;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown .user-info {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.user-dropdown .user-info span {
    display: block;
}

.user-dropdown .user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 0;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: var(--bg-hover);
}

/* ============================================
   Navigation
   ============================================ */

nav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-subtle);
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

nav a:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

nav a.active {
    color: var(--text-primary);
    background: var(--wine-primary);
}

/* ============================================
   Main content
   ============================================ */

main {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wine-primary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    min-height: 44px;
}

.btn:hover {
    background: var(--wine-light);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-done {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: default;
    opacity: 0.7;
}

.btn-done:hover {
    background: var(--bg-elevated);
    transform: none;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   Wine Card - Core Component
   ============================================ */

.wine-card {
    position: relative;
    display: flex;
    gap: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    min-height: 140px;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.wine-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-elevated);
}

/* Exceptional wine highlight */
.wine-card.tier-exceptional {
    border-color: var(--gold);
    border-top-width: 3px;
    box-shadow: var(--shadow-card), 0 0 24px var(--gold-glow);
}

/* Priority indicators */
.wine-card.priority-1 {
    position: relative;
}

.wine-card.priority-1::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gold);
}

.wine-card.priority-2::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--wine-primary);
}

/* Compact variant */
.wine-card.compact {
    min-height: auto;
    align-items: center;
}

.wine-card.compact .wine-card-image {
    width: 85px;
    height: 125px;
    min-height: 0;
}

/* Image */
.wine-card-image {
    width: 100px;
    min-height: 140px;
    object-fit: contain;
    background: linear-gradient(145deg, #1f1f24 0%, #15151a 100%);
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.wine-card-image:hover {
    opacity: 0.9;
}

.wine-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: default;
}

/* Body */
.wine-card-body {
    flex: 1;
    padding: 0.75rem 0.875rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.wine-card-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.wine-card-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats row */
.wine-card-stats {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.stat-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.wine-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Price code badges */
.price-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.price-badge.clearance {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    animation: pulse-urgent 2s ease-in-out infinite;
}

.price-badge.final {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.4);
    animation: pulse-urgent 2s ease-in-out infinite;
}

.price-badge.sale {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.price-badge.trial {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Score pills with tier coloring */
.score-pill {
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.score-pill .score-label {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.8;
}

/* ADJ score tiers */
.score-pill.adj {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.score-pill.adj.tier-exceptional {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.score-pill.adj.tier-acceptable {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.score-pill.adj.tier-poor {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

/* VALUE score tiers */
.score-pill.value {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.score-pill.value.tier-exceptional {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: #1a1a1f;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.score-pill.value.tier-acceptable {
    background: rgba(74, 222, 128, 0.15);
    color: var(--acceptable);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.score-pill.value.tier-poor {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

/* FIT score tiers (burgundy theme) */
.score-pill.fit {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.score-pill.fit.tier-fit-great {
    background: linear-gradient(135deg, #722f37 0%, #a8415b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.4);
}

.score-pill.fit.tier-fit-good {
    background: rgba(139, 41, 66, 0.15);
    color: var(--wine-light);
    border: 1px solid rgba(139, 41, 66, 0.4);
}

.score-pill.fit.tier-fit-muted {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

/* Legacy support */
.saul-score {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.wine-card-value {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: #1a1a1f;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Priority badges */
.priority-badge {
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.priority-badge.load-truck {
    background: linear-gradient(135deg, var(--gold) 0%, #b8960c 100%);
    color: #1a1a1f;
}

.priority-badge.must-find {
    background: var(--wine-primary);
}

.priority-badge.hidden {
    display: none;
}

.new-badge {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border-medium);
}

/* Combined details row (stores + critic ratings) */
.wine-card-details {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.4rem;
}

.wine-card-rating {
    background: var(--bg-elevated);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid var(--border-subtle);
}

.wine-card-rating .source {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.6rem;
    font-weight: 600;
}

.wine-card-rating .score {
    font-weight: 700;
    color: var(--text-primary);
    margin-left: 0.2rem;
}

.stock-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stock-badge.in-stock {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.stock-badge.low-stock {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.stock-badge.more {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.15s ease;
}

.stock-badge.more:hover {
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

/* Review summary */
.wine-card-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 0.3rem;
    cursor: pointer;
}

.wine-card-summary .summary-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wine-card-summary.expanded .summary-text {
    display: block;
    -webkit-line-clamp: unset;
}

.wine-card-summary .summary-more {
    color: var(--wine-light);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.wine-card-summary.expanded .summary-more {
    display: none;
}

.community-buzz {
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.extra-ratings {
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wine-card-summary.expanded .community-buzz {
    display: block;
}

.wine-card-summary.expanded .extra-ratings {
    display: flex;
}

/* Actions row */
.wine-card-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.wine-card-actions .btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    min-height: 36px;
    white-space: nowrap;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: lbIn 0.2s ease-out;
    backdrop-filter: blur(8px);
}

@keyframes lbIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox img {
    max-width: 92vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
}

.lightbox-hint {
    position: absolute;
    bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   History-specific
   ============================================ */

.wine-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.wine-card-rating-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.3rem;
}

.wine-card-rating-stars .stars {
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 1px;
}

.wine-card-rating-stars .no-rating {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.8rem;
}

.wine-card-notes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-medium);
}

/* ============================================
   Action button variants
   ============================================ */

.btn-rate {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    min-height: 38px;
    transition: all 0.15s ease;
}

.btn-rate:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-delete {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    min-height: 38px;
    transition: all 0.15s ease;
}

.btn-delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-remove {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    min-height: 38px;
    transition: all 0.15s ease;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.15);
}

.btn-found {
    background: var(--wine-primary);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    min-height: 38px;
    transition: all 0.15s ease;
}

.btn-found:hover {
    background: var(--wine-light);
}

/* ============================================
   Loading & Empty States
   ============================================ */

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-elevated);
    border-top-color: var(--wine-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1rem auto 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    display: flex;
    gap: 0.875rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    min-height: 150px;
}

.skeleton-image {
    width: 120px;
    min-height: 150px;
    background: var(--bg-elevated);
}

.skeleton-body {
    flex: 1;
    padding: 0.75rem 0.875rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-line {
    height: 14px;
}

.skeleton-line.title {
    width: 80%;
    height: 20px;
}

.skeleton-line.short {
    width: 50%;
}

.skeleton-pills {
    display: flex;
    gap: 0.5rem;
}

.skeleton-pill {
    width: 60px;
    height: 24px;
    border-radius: 6px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state h2,
.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.empty-state .btn {
    margin-top: 0.5rem;
}

/* ============================================
   Landing page
   ============================================ */

.landing {
    text-align: center;
    padding: 2rem 1rem;
}

.landing h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.landing p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.mode-cards {
    display: grid;
    gap: 1rem;
}

.mode-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.mode-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.mode-card h3 {
    font-family: var(--font-display);
    color: var(--wine-light);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.mode-card p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-secondary);
}

/* Page title */
.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

/* Item list container */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================
   Toast notifications
   ============================================ */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 1.7s forwards;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-medium);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ============================================
   Modal (History rating)
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 340px;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-elevated);
}

.modal-content h3 {
    font-family: var(--font-display);
    margin-bottom: 1.25rem;
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.star-rating span {
    font-size: 2.25rem;
    color: var(--bg-hover);
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

.star-rating span:hover {
    transform: scale(1.1);
}

.star-rating span.active {
    color: var(--gold);
}

.price-input {
    margin-bottom: 1rem;
}

.price-input label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.price-input input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    text-align: center;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.price-input input:focus {
    outline: none;
    border-color: var(--wine-primary);
}

#rating-notes {
    width: 100%;
    height: 90px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.9rem;
    resize: none;
    margin-bottom: 1.25rem;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
}

#rating-notes:focus {
    outline: none;
    border-color: var(--wine-primary);
}

#rating-notes::placeholder {
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
}

.modal-actions .btn {
    flex: 1;
}
