:root {
    --bilka-blue: #004e9e;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-dark: #333;
    --success: #28a745;
    --danger: #dc3545;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.main-container {
    width: 95%;
    max-width: 1100px;
    padding: 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 10px;
}

.header-right {
    display: flex;
    gap: 15px;
}

h1 { margin: 0; font-size: 1.8rem; }
.bilka-blue { color: var(--bilka-blue); }

.score-pill {
    background: var(--bg-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    color: var(--bilka-blue);
    font-size: 1.1rem;
}

.score-pill.highscore {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Game Arena Layout */
.game-arena {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: opacity 0.3s ease;
}

/* Product Cards */
.product-card {
    background: var(--card-bg);
    flex: 1;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.img-container {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.category-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 78, 158, 0.8);
    color: white;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 10px;
}

.product-card h2 {
    font-size: 1.2rem;
    margin: 10px 0 5px;
    min-height: 1.4em; 
}

.brand { color: #777; margin-bottom: 15px; font-style: italic;}

.price-box {
    font-size: 1.6rem;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    color: var(--bilka-blue);
    transition: all 0.3s ease;
}

.price-box.masked {
    background: #e9ecef;
    color: #aaa;
    letter-spacing: 2px;
}

/* Reveal Animations */
.reveal-correct { animation: pulseGreen 1s ease; background-color: rgba(40, 167, 69, 0.1) !important; color: var(--success) !important; }
.reveal-wrong { animation: shakeRed 0.5s ease; background-color: rgba(220, 53, 69, 0.1) !important; color: var(--danger) !important; }

@keyframes pulseGreen { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shakeRed { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Controls Section */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
}

.vs-badge {
    background: var(--bilka-blue);
    color: white;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.guess-btn {
    width: 100%;
    padding: 15px 20px;
    margin: 10px 0;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.guess-btn:active { transform: scale(0.98); }

.higher { background-color: var(--success); color: white; }
.higher:hover { background-color: #218838; }

.lower { background-color: var(--danger); color: white; }
.lower:hover { background-color: #c82333; }

/* Overlays */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 78, 158, 0.9);
    display: flex; justify-content: center; align-items: center; color: white; z-index: 100;
}

.overlay-content { text-align: center; background: white; color: var(--text-dark); padding: 40px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); max-width: 90%; width: 400px;}

.final-score-text { font-size: 2rem; font-weight: bold; margin: 10px 0; color: var(--bilka-blue); }
.actual-price-text { font-size: 1.1rem; color: #666; margin-bottom: 30px; }

/* New High Score Animation */
#new-highscore-msg {
    background: #ffc107;
    color: #000;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    margin: 10px 0;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.start-btn, .share-btn {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.start-btn { background: var(--bilka-blue); }
.start-btn:hover { background: #003d7a; }

.share-btn { background: var(--bilka-blue); } /* Starts blue, turns green via JS */
.share-btn:hover { opacity: 0.9; }

/* Mobile Responsive */
@media (max-width: 768px) {
    header { flex-direction: column; text-align: center; }
    .game-arena { flex-direction: column; }
    .controls { flex-direction: row; justify-content: space-between; width: 100%; gap: 10px; order: 2;}
    .guess-btn { padding: 10px; font-size: 1rem; }
    #card-a { order: 1; }
    #card-b { order: 3; }
    .controls p, .vs-badge { display: none; }
}