:root {
    --bg-color: #e3f2fd;
    /* Light Blue */
    --container-bg: rgba(255, 255, 255, 0.95);
    --primary-color: #1565c0;
    /* Royal Blue */
    --secondary-color: #fdd835;
    /* Dosa Gold */
    --text-color: #0d47a1;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Fredoka', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    background-image: url('dosa1.png');
    background-size: 80px;
    /* Increased spacing between dosas */
    background-repeat: repeat;
    background-position: center;
    font-family: var(--font-body);
    overflow: hidden;
    touch-action: none;
}

.container {
    text-align: center;
    max-width: 95%;
    width: 500px;
    position: relative;
    z-index: 10;
}

.content {
    background: var(--container-bg);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(21, 101, 192, 0.15);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.header-text {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    line-height: 1.2;
}

.emoji-container {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    user-select: none;
}

.success-img {
    width: 100%;
    max-width: 250px;
    border-radius: 15px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    position: relative;
    min-height: 70px;
    width: 100%;
    align-items: center;
}

button {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    /* Equal width buttons */
    flex: 1;
    min-width: 140px;
    max-width: 200px;

    /* Text handling */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.3;
}

.yes-btn {
    background-color: var(--primary-color);
    color: white;
    z-index: 2;
}

.yes-btn:hover,
.yes-btn:active {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(21, 101, 192, 0.3);
}

.no-btn {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    z-index: 5;
    /* Removed absolute positioning - button starts in normal flow */
}

/* When No button goes absolute (final step) */
.no-btn[style*="position: fixed"] {
    white-space: nowrap;
    width: auto;
    min-width: 140px;
}

.hidden {
    display: none;
}

/* Success State */
.success-content {
    display: none;
    background: var(--container-bg);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(21, 101, 192, 0.15);
    animation: popIn 0.5s ease forwards;
}

.success-content.show {
    display: block;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .content {
        padding: 30px 20px;
        width: 95%;
        margin: 0 auto;
    }

    .header-text {
        font-size: 2.2em;
    }

    .emoji-container {
        font-size: 60px;
    }

    button {
        padding: 15px 18px;
        font-size: 1rem;
        min-width: 120px;
    }

    .btn-group {
        margin-bottom: 20px;
    }
}