/**
 * Funquizo Games - Serve It! Sushi Theme Styles (v1.1)
 * Text removed from dishes for pure visual speed matching.
 */

.serve-fruit-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 16px 32px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Mode Switcher / Header Bar */
.serve-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.serve-timer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 9999px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.serve-timer-icon {
    font-size: 1.15rem;
}

.serve-timer-digits {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.02em;
}

.serve-timer-box.urgent {
    border-color: #ef4444;
    background: #fef2f2;
}

.serve-timer-box.urgent .serve-timer-digits {
    color: #dc2626;
    animation: fqPulseUrgent 0.8s infinite;
}

@keyframes fqPulseUrgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.serve-score-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.serve-score-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: #e11d48;
    font-variant-numeric: tabular-nums;
}

.serve-combo-pill {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    background: #94a3b8;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.85);
}

.serve-combo-pill.active {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.serve-combo-pill.mega {
    background: linear-gradient(135deg, #e11d48, #be123c);
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.45);
    animation: fqBlinkCombo 0.6s infinite alternate;
}

@keyframes fqBlinkCombo {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* 1 vs 1 Opponent HUD */
.serve-1v1-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.serve-1v1-bar.active {
    display: flex;
}

.serve-1v1-pill-you {
    color: #f43f5e;
}

.serve-1v1-pill-opp {
    color: #94a3b8;
}

/* Serving Stage / Customer Area */
.serve-stage-area {
    position: relative;
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
    border: 2px solid #fecdd3;
    border-radius: 20px;
    padding: 16px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.08);
}

.serve-customer-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.serve-customer-avatar {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Customer Speech Bubble (Current Order) */
.serve-order-bubble {
    position: relative;
    background: #ffffff;
    border: 2px solid #f43f5e;
    border-radius: 16px;
    padding: 8px 14px;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.serve-order-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 10px 6px 0;
    border-style: solid;
    border-color: transparent #f43f5e transparent transparent;
}

.serve-order-bubble::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 8px 5px 0;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
}

.serve-order-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #e11d48;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2px;
}

.serve-order-item-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.serve-order-emoji {
    font-size: 2.85rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

/* Hide dish name in order bubble & next box */
.serve-order-name,
.serve-next-name {
    display: none !important;
}

/* NEXT Order Preview */
.serve-next-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 6px 14px;
    min-width: 76px;
    text-align: center;
}

.serve-next-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.serve-next-item-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.serve-next-emoji {
    font-size: 1.85rem;
    line-height: 1;
}

/* Sushi Tray (Grid) */
.serve-tray-wrap {
    position: relative;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 14px;
    min-height: 240px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.serve-tray-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    touch-action: manipulation;
}

@media (min-width: 480px) {
    .serve-tray-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* Sushi Card Button - Clean, large emoji, no text */
.serve-fruit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    border-radius: 18px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    outline: none;
    transition: transform 0.12s cubic-bezier(0.2, 0.9, 0.4, 1.2), box-shadow 0.12s ease, border-color 0.12s ease;
    user-select: none;
    min-height: 84px;
}

.serve-fruit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.serve-fruit-card:active {
    transform: scale(0.93);
}

.serve-fruit-card-emoji {
    font-size: 3.2rem;
    line-height: 1;
    margin: 0;
    pointer-events: none;
}

/* Hide text label on the dishes */
.serve-fruit-card-name {
    display: none !important;
}

/* Ready Overlay (Tap to Start) */
.serve-start-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 16px;
    text-align: center;
}

.serve-start-btn {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    border: none;
    padding: 12px 30px;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-bottom: 8px;
}

.serve-start-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.45);
}

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

.serve-start-tip {
    font-size: 0.85rem;
    color: #64748b;
    max-width: 320px;
}

/* Result Modal Overlay */
.serve-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 16px;
}

.serve-result-overlay.active {
    display: flex;
    animation: fqFadeIn 0.25s ease forwards;
}

@keyframes fqFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.serve-result-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px 24px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: fqModalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fqModalScale {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.serve-result-time-badge {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    padding: 4px 14px;
    border-radius: 9999px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.serve-result-score-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.serve-result-score-val {
    font-size: 3.25rem;
    font-weight: 900;
    color: #e11d48;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.serve-result-pb-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 18px;
}

.serve-result-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 20px;
}

.serve-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.serve-stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.serve-stat-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.serve-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.serve-btn-again {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
    transition: transform 0.15s ease;
}

.serve-btn-again:hover {
    transform: translateY(-2px);
}

.serve-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    padding: 10px 20px;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s ease;
}

.serve-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Sound toggle button in header */
.serve-sound-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #475569;
    transition: background 0.15s ease;
}

.serve-sound-btn:hover {
    background: #f8fafc;
}
