* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}


.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-body {
    padding: 20px;
    text-align: center;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.main-img {
    width: 100%;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}


.btn-success {
    background-color: #28a745;
    color: white;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

/* Gift Grid */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.gift-box {
    background-color: var(--gift-box-color);
    /* Fallback or main color */
    aspect-ratio: 1;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    transition: transform 0.2s;
    overflow: hidden;
    /* Keep content inside */
}

/* CSS Gift Box Design */
.lid {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 80%;
    height: 20%;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: transform 0.5s ease;
    transform-origin: top center;
}

.box {
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 70%;
    height: 60%;
    background: rgba(0, 0, 0, 0.1);
    /* Slight darken */
    z-index: 1;
}

.gift-box:active {
    transform: scale(0.95);
}

.gift-box.open {
    background-color: #f8f9fa;
    /* Reveal light background for content */
    cursor: default;
}

.gift-box.open .lid {
    transform: rotateX(-110deg) translateY(-20px);
    opacity: 0;
}

.gift-box.open .box {
    opacity: 0.1;
    /* Fade out box structure to show content */
}

/* Content inside box (Check/X) */
.gift-box.open::after {
    /* Handle content via JS innerHTML, but ensure it's visible */
    z-index: 10;
    color: #333;
    font-size: 2rem;
}

.gift-box-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    pointer-events: none;
    /* Let click pass to container */
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    position: relative;
}

.modal-content.small {
    width: 300px;
}

/* Quiz Options Refined */
.btn-outline-primary {
    border: none;
    background: #3b5998;
    /* Standard Blue */
    color: white;
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 0 #2d4373;
    /* 3D effect */
    transition: transform 0.1s;
}

.btn-outline-primary:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* Share Page Styles */
.share-box-container {
    background: #e9ebee;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.instruction-text {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.share-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    text-transform: capitalize;
    display: flex;
    /* Centering icon and text */
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-whatsapp {
    background-color: #25D366;
    box-shadow: 0 4px 0 #128C7E;
}

.btn-messenger {
    background-color: #0084FF;
    background: linear-gradient(to right, #00c6ff, #0072ff);
    box-shadow: 0 4px 0 #0056b3;
}

/* Messenger gradient */
.btn-telegram {
    background-color: #0088cc;
    box-shadow: 0 4px 0 #005f8d;
}

.share-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.btn-continue {
    background-color: #4267b2;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 12px;
    border-radius: 5px;
    border: none;
    box-shadow: 0 4px 0 #2d4373;
}

.btn-continue:disabled {
    background-color: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* Common overrides */
.text-danger {
    color: #dc3545;
}

.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 1rem;
}

/* Form */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Header Design */
.custom-header {
    background: white;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-top {
    padding: 15px;
    text-align: center;
    background: white;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: #00a651;
    /* Pothys Green */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    font-family: serif;
    border: 1px solid #00803e;
}

.logo-text-box {
    background: white;
    color: #ed1c24;
    /* Pothys Red */
    border: 2px solid #ed1c24;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 1px;
}

.header-bottom {
    background-color: var(--menu-bg);
    /* Use dynamic menu color */
    /* Facebook Blue / Generic Blue */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
}

.header-info-left {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.header-info-right {
    font-size: 14px;
}

/* Timer Section */
.timer-section {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    animation: pulse 2s infinite;
}

.timer-text {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.timer-display {
    font-size: 24px;
    font-weight: bold;
    color: #d9534f;
    margin: 5px 0;
    font-family: monospace;
}

.timer-subtext {
    margin: 0;
    font-size: 12px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}


/* Hero Section */
.hero-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Constrain width to match content */
    margin: 0 auto 20px auto;
    /* Center align */
    text-align: center;
    background: #000;
    color: white;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.7;
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-size: 22px;
    margin-bottom: 5px;
    color: #fff;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 14px;
    margin: 0;
}

/* Comments Section */
.comments-section {
    background: white;
    border-top: 1px solid #ddd;
    padding: 10px;
    margin-top: 20px;
    font-family: sans-serif;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-weight: bold;
    color: #555;
    border-bottom: 1px solid #eee;
}

.comment-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    background: #ccc;
}

.comment-content {
    flex: 1;
}

.comment-name {
    font-weight: bold;
    font-size: 14px;
    color: #365899;
}

.comment-text {
    font-size: 13px;
    margin: 2px 0;
    color: #333;
}

.comment-actions {
    font-size: 12px;
    color: #90949c;
    cursor: pointer;
}

.comment-actions span:hover {
    text-decoration: underline;
}

.add-comment {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

.add-comment textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    resize: none;
    height: 35px;
}

/* Quiz Card adjustments */
.quiz-card {
    margin-top: -10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: none;
    border: none;
}

/* Money Animation */
#money-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
    pointer-events: none;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Money Rain Animation */
.money-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2001;
    overflow: hidden;
}

.money-piece {
    position: absolute;
    width: 50px;
    height: auto;
    animation: fall linear forwards, rotateCoin linear infinite;
}

@keyframes fall {
    0% {
        top: -100px;
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100vh;
        opacity: 0;
    }
}

@keyframes rotateCoin {
    0% {
        transform: rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateY(360deg) rotateZ(360deg);
    }
}