:root {
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --primary-color: #ffd700; /* Gold */
    --secondary-color: #0057b7; /* Blue */
    --accent-color: #ff4d4d;
    --font-family: 'Outfit', sans-serif;
    --yes-scale: 1;
}

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

body {
    background: #000;
    color: #fff;
    font-family: 'Black Ops One', 'Russo One', system-ui, sans-serif;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw; /* Reduced from 60vw */
    height: 40vh; /* Reduced from 60vh */
    background: radial-gradient(circle, rgba(0, 87, 183, 0.15) 0%, rgba(13, 13, 13, 0) 70%);
    z-index: -1;
    filter: blur(60px); /* Reduced from 100px - huge performance win */
    pointer-events: none;
}

header {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-picker {
    position: relative;
    user-select: none;
    z-index: 3000;
}

.custom-select {
    position: relative;
    width: 155px;
    font-family: inherit;
}

.select-selected {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    font-size: 0.85rem;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.select-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.select-selected .chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.select-selected.select-arrow-active .chevron {
    transform: rotate(180deg);
}

.select-items {
    position: absolute;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 100;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select-hide {
    display: none;
}

.select-items div {
    color: white;
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.select-items div:hover {
    background: rgba(255, 215, 0, 0.15);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.flag-emoji {
    font-size: 1.2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
    width: 100%;
}

.question-container {
    padding: 20px;
    z-index: 10;
}

h1 {
    font-size: 4rem;
    font-weight: 400; /* Stencil fonts often look better at regular weight */
    margin-bottom: 40px;
    letter-spacing: 0.1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, white 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.button-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    position: relative;
    min-height: 80px;
}

.btn {
    padding: 20px 50px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.05rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
    width: 170px;
    will-change: transform;
}

.primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #003a7a 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 87, 183, 0.4);
    transform: scale(var(--yes-scale));
}

.primary:hover {
    transform: translateY(-5px) scale(calc(var(--yes-scale) * 1.05));
}

.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    position: relative; /* Changed from absolute to allow easier transform logic */
    z-index: 1000;
}

.secondary:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}




.hidden {
    display: none !important;
}

#revealOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease forwards;
    overflow: hidden;
}

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

.reveal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#revealText {
    font-size: 6rem;
    font-weight: 400;
    letter-spacing: 0.15rem;
    color: var(--primary-color);
    text-shadow: 0 5px 25px rgba(255, 215, 0, 0.6);
    margin-bottom: 20px;
    line-height: 1.1;
    z-index: 20;
    width: 90%;
    text-align: center;
    pointer-events: none;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.image-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: flex-end;
}

/* Gradient to blend image top into black background */
.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, #000 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

#revealImg {
    width: 100%;
    height: 100%; /* Fill container */
    object-fit: cover;
    object-position: bottom; /* Ensure bottom is NOT cut off */
    opacity: 0.9;
}

.share-section {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2005;
    text-align: right;
    background: transparent;
    padding: 0;
    border: none;
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: 250px;
}

#sharingLabelText {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
    line-height: 1.2;
}

.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.share-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.footer-actions {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2005;
}

#resetBtn {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 900;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    transition: all 0.2s ease;
}

#resetBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
    background: #fff;
}

/* Growth Animations for Yes Button */
.growing {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulsing {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(var(--yes-scale)); opacity: 1; }
    50% { transform: scale(calc(var(--yes-scale) * 1.05)); opacity: 0.9; }
    100% { transform: scale(var(--yes-scale)); opacity: 1; }
}

/* Ukrainian Flag Theme for maxed-out button */
button.ukrainian-flag {
    background: linear-gradient(to bottom, #0057b7 50%, #ffd700 50%) !important;
    background-size: 100% 100% !important;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border: none !important;
    box-shadow: none !important;
}

/* Social Sharing Section - Positioned below header */
.share-section {
    position: absolute;
    top: 140px;
    right: 30px;
    z-index: 2010;
    max-width: 300px;
    text-align: right;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 12px;
}

.share-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.share-btn svg {
    display: block;
    width: 24px;
    height: 24px;
}

.x-btn { background: #000; color: white; }
.fb-btn { background: #1877f2; color: white; }
.wa-btn { background: #25d366; color: white; }
.viber-btn { background: #7360f2; color: white; }
.email-btn { background: #ea4335; color: white; }
.tg-btn { background: #24A1DE; color: white; }
.li-btn { background: #0077B5; color: white; }
.rd-btn { background: #FF4500; color: white; }

/* Mobile Responsiveness for Reveal Screen */
@media (max-width: 600px) {
    #revealText {
        font-size: 3.5rem;
    }
    
    .footer-actions {
        top: 10px;
        left: 10px;
    }

    .share-section {
        top: 110px; /* Lower than header */
        right: 15px;
        max-width: 220px;
        padding: 10px;
    }
    
    #sharingLabelText {
        font-size: 0.8rem;
    }

    #resetBtn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* Optimization for low-end devices */
.btn, .share-btn, .secondary, .primary {
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}
