body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: white;
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

.navbar {
    background-color: #000;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.title {
    color: #7fffd4;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin: 0;
}

.nav-btn {
    background: none;
    border: none;
    color: #7fffd4;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    color: white;
}

.nav-btn i {
    font-size: 1.2rem;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: #222;
    padding: 2rem;
    border-radius: 8px;
    max-width: 90%;
    width: 400px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #7fffd4 #333;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #7fffd4;
    border-radius: 4px;
}

.modal-content h2 {
    color: #7fffd4;
    margin-bottom: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

.modal-close:hover {
    color: white;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-section {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.board-container {
    width: 100%;
    padding: 0 15px;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background-color: #333;
    aspect-ratio: 1;
    width: 100%;
    max-width: none;
}

.cell {
    background-color: #222;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: clamp(2rem, 8vw, 3rem);
    transition: background-color 0.2s;
}

.cell:hover {
    background-color: #2a2a2a;
}

.cell.winner {
    background-color: #2ecc71;
    transition: background-color 0.3s ease;
    animation: winPulse 1s ease-in-out;
}

@keyframes winPulse {
    0% { background-color: #222; }
    50% { background-color: #2ecc71; }
    100% { background-color: #2ecc71; }
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.controls button {
    background: none;
    border: 2px solid #666;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.controls button:hover {
    border-color: #999;
    background-color: #333;
}

.stats {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.stats p {
    margin: 0.5rem 0;
}

#gameImage {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .stats {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin: 1rem 0;
    }

    .title {
        text-align: center;
    }

    .game-status {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
}

.game-status {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.trophy-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .trophy-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .trophy-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .trophy-gallery {
        grid-template-columns: repeat(1, 1fr);
    }
}

.trophy-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #333;
    transition: all 0.3s ease;
    opacity: 0.7;
    cursor: pointer;
}

.trophy-image:hover {
    transform: scale(1.1);
    border-color: #7fffd4;
    opacity: 1;
    box-shadow: 0 0 15px rgba(127, 255, 212, 0.3);
}

.trophy-image.locked {
    filter: grayscale(100%) brightness(30%) blur(8px);
    border-color: #444;
    cursor: not-allowed;
}

.trophy-image.locked:hover {
    transform: none;
    border-color: #444;
    box-shadow: none;
}

.trophy-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trophy-level {
    color: #7fffd4;
    font-size: 1rem;
    margin-top: 0.8rem;
    text-align: center;
}

.help-content {
    color: white;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.help-content p {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 3px solid #7fffd4;
}

.ad-space {
    width: 100%;
    height: 120px;
    background-color: #222;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #444;
}

.ad-placeholder {
    color: #666;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Desktop ad sizes */
@media (min-width: 992px) {
    .ad-space {
        height: 150px;
        max-width: 728px;
        margin: 0 auto;
    }
}

/* Mobile ad sizes */
@media (max-width: 991px) {
    .ad-space {
        height: 100px;
    }
}

.interstitial-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.interstitial-overlay.active {
    display: flex;
}

.interstitial-content {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.ad-space.interstitial {
    width: 100%;
    height: 400px;
    max-width: none;
    background-color: #222;
    border: none;
}

.close-interstitial {
    background-color: #7fffd4;
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-interstitial:hover {
    background-color: #5fdfb4;
    transform: scale(1.05);
}

.world-header {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: #333;
    color: #7fffd4;
    font-size: 1.5rem;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.world-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: #7fffd4 #333;
}

.world-gallery::-webkit-scrollbar {
    height: 8px;
}

.world-gallery::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.world-gallery::-webkit-scrollbar-thumb {
    background-color: #7fffd4;
    border-radius: 4px;
}

.trophy-gallery {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.trophy-container {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    width: 150px;
}

.trophy-container:hover:not(.locked) {
    transform: scale(1.05);
}

.trophy-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #444;
    transition: all 0.3s ease;
}

.trophy-image.locked {
    filter: blur(4px) grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}

.trophy-level {
    font-size: 0.9rem;
    color: #7fffd4;
    text-align: center;
    font-weight: bold;
}

/* Remove old grid-based media queries */
@media (max-width: 1200px), (max-width: 768px), (max-width: 480px) {
    .trophy-gallery {
        max-width: 600px;
    }
    
    .world-gallery {
        padding: 0.5rem;
    }
}

.footer {
    background-color: #111;
    padding: 2rem 1rem;
    margin-top: 4rem;
    border-top: 1px solid #333;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #7fffd4;
}

.footer-copyright {
    color: #444;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

.policy-content {
    color: white;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.policy-content p {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 3px solid #7fffd4;
} 