/* Lazy Loader Styles */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a1a0f; /* Fallback deep jungle green */
    background-color: var(--jungle-deep);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

#loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

#loader-text {
    margin-top: 60px;
    color: var(--jungle-moss);
    font-family: 'Luckiest Guy', cursive;
    font-size: 32px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: textPulse 1.5s ease-in-out infinite;
}

.pig-spinner {
    position: relative;
    width: 150px;
    height: 150px;
    animation: rotateSpinner 5s linear infinite;
}

.spinner-pig {
    position: absolute;
    font-size: 35px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center each pig relative to its point on the circle */
    transform: translate(-50%, -50%);
}

/* Arrange 8 pigs in a perfect circle */
.spinner-pig:nth-child(1) { top: 0%; left: 50%; }
.spinner-pig:nth-child(2) { top: 14.6%; left: 85.4%; }
.spinner-pig:nth-child(3) { top: 50%; left: 100%; }
.spinner-pig:nth-child(4) { top: 85.4%; left: 85.4%; }
.spinner-pig:nth-child(5) { top: 100%; left: 50%; }
.spinner-pig:nth-child(6) { top: 85.4%; left: 14.6%; }
.spinner-pig:nth-child(7) { top: 50%; left: 0%; }
.spinner-pig:nth-child(8) { top: 14.6%; left: 14.6%; }

@keyframes rotateSpinner {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes textPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

* {
    box-sizing: border-box;
}

:root {
    --jungle-deep: #0a1a0f;
    --jungle-moss: #8ae234;
    --jungle-mint: #d3f9d8;
    --jungle-dark: #1a2e1f;
    --accent-gold: #fce94f;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--jungle-deep);
    color: var(--jungle-mint);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 10s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

header {
    text-align: center;
    padding: 60px 20px 40px;
}

.main-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--jungle-moss);
    margin: 0;
    letter-spacing: 4px;
    text-shadow: 
        4px 4px 0px var(--jungle-dark),
        0px 0px 20px rgba(138, 226, 52, 0.4);
    animation: titleFloat 3s ease-in-out infinite;
}

/* Disclaimer Modal Styles */
.disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.disclaimer-content {
    background: var(--jungle-dark);
    border: 4px solid #ff4444;
    border-radius: 20px;
    max-width: 600px;
    width: 95%;
    height: auto;
    max-height: 98vh;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 68, 68, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* No scroll as requested */
}

.disclaimer-18plus {
    background: #ff4444;
    color: white;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 10px;
}

.disclaimer-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.8rem;
    color: #ff4444;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.disclaimer-text {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--jungle-mint);
    white-space: pre-line;
    text-align: left;
}

.disclaimer-btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.disclaimer-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 10px 25px;
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    max-width: 150px;
}

.disclaimer-btn.secondary {
    background: transparent;
    border: 2px solid #ff4444;
}

.disclaimer-btn:hover {
    transform: scale(1.05);
    background: #ff6666;
}

.disclaimer-btn.secondary:hover {
    background: rgba(255, 68, 68, 0.1);
}

/* Static Footer Disclaimer Removed */

@media (max-width: 480px) {
    .disclaimer-content {
        padding: 15px 10px;
        width: 98%;
    }
    .disclaimer-title {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }
    .disclaimer-text {
        font-size: 0.75rem; /* Very small to fit without scroll */
        line-height: 1.2;
        margin-bottom: 10px;
    }
    .disclaimer-btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
    .disclaimer-18plus {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--jungle-mint);
    opacity: 0.8;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 40px;
    padding: 20px;
    max-width: 1200px;
    width: 100%;
}

.game-card {
    background: var(--jungle-dark);
    border: 3px solid var(--jungle-moss);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.game-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
    opacity: 0;
}

.game-card:hover::after {
    opacity: 1;
    left: 100%;
    top: 100%;
}

.game-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(138, 226, 52, 0.2);
    border-color: var(--accent-gold);
}

.card-image {
    height: 200px;
    background: linear-gradient(135deg, #1a2e1f 0%, #0a1a0f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 100px;
    border-bottom: 3px solid var(--jungle-moss);
    overflow: hidden; /* Ensure image doesn't overflow */
    position: relative;
}

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.card-badges-right {
    left: auto;
    right: 10px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Luckiest Guy', cursive;
    font-size: 0.7rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.badge-multiplayer {
    background: #4CAF50;
    color: white;
}

.badge-flagship {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000;
    font-weight: 900;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.badge-soon {
    background: #ff9800;
    color: white;
}

.play-btn.locked {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.game-card.coming-soon {
    opacity: 0.8;
    cursor: default;
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--jungle-moss);
}

.game-card.coming-soon:hover .play-btn.locked {
    transform: none;
    background: #444;
}

.game-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 10px; /* Add some padding so it doesn't touch the edges */
}

.game-card:hover .game-preview {
    transform: scale(1.1);
}

.game-card:hover .card-image {
    background: linear-gradient(135deg, #2a4e2f 0%, #1a2e1f 100%);
}

.game-card.lahori .card-image { background: linear-gradient(135deg, #4e342e 0%, #261b18 100%); }
.game-card.stealth .card-image { background: linear-gradient(135deg, #0a1a0f 0%, #000000 100%); }
.game-card.pigs .card-image { background: linear-gradient(135deg, #556b2f 0%, #2f4f4f 100%); }
.game-card.sanjay .card-image { background: linear-gradient(135deg, #ff00ff 0%, #4b0082 100%); }

.card-info {
    padding: 25px;
    text-align: center;
}

.card-info h2 {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: var(--jungle-moss);
    margin: 0 0 15px;
}

.card-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.inline-ghost {
    height: 1.4em;
    vertical-align: middle;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
}

.play-btn {
    display: inline-block;
    background: var(--jungle-moss);
    color: var(--jungle-deep);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-family: 'Luckiest Guy', cursive;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.game-card:hover .play-btn {
    background: var(--accent-gold);
    transform: scale(1.1);
}

footer {
    margin-top: auto;
    padding: 40px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--jungle-moss);
    color: var(--jungle-deep);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background: var(--accent-gold);
    transform: scale(1.1);
}

@media (max-width: 600px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    header {
        padding: 30px 15px 20px;
    }

    .main-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .game-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 15px;
        width: 100%;
        margin: 0 auto;
    }

    .game-card {
        border-radius: 12px;
        border-width: 2px;
        width: 100%;
    }

    .card-image {
        height: 120px;
        font-size: 50px;
    }

    .card-info {
        padding: 12px 8px;
    }

    .card-info h2 {
        font-size: 1rem;
        margin-bottom: 6px;
        white-space: normal;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-info p {
        font-size: 0.75rem;
        margin-bottom: 12px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .play-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .inline-ghost {
        height: 1.1em;
    }
}
