body {
    font-family: 'Ubuntu', sans-serif;
    background-image: url('../images/background.webp');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    position: relative;
    padding: 10px 0;
    margin-bottom: 40px;
}

.back-button {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 36px;
    text-decoration: none;
    padding: 15px;
    z-index: 10;
    transition: opacity 0.2s;
}

.back-button:hover {
    opacity: 0.8;
}

h1 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 48px;
    color: white;
    margin-top: -8px; /* Make more negative to move higher */
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}


.subtitle {
    color: white;
    font-size: 28px;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.timer-container {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    max-width: 200px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.timer {
    font-size: 36px;
    font-weight: bold;
    color: #4AA7FF;
    font-family: 'Ubuntu', monospace;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #4AA7FF;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

.controls {
    margin: 30px auto;
    max-width: 800px;
}

.search-box {
    display: flex;
    position: relative;
    margin: 20px auto;
    z-index: 1001;
    border: 4px solid #00182e;
    border-radius: 30px;
    background: white;
    height: 55px;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#pal-input {
    padding: 0 25px;
    width: 100%;
    border: none;
    font-size: 18px;
    background: transparent;
    height: 100%;
    outline: none;
    border-radius: 30px 0 0 30px;
}

#submit {
    padding: 0;
    background: #4AA7FF;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 26px 26px 0;
    transition: background-color 0.2s;
}

#submit:hover {
    background: #3590e3;
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.filter-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.filter-button.active {
    background: #4AA7FF;
    color: white;
}

.filter-select {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    font-size: 16px;
    outline: none;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 3px;
    padding: 20px;
    margin: 20px 0;
}

.pal-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80px;  /* Make the cards narrower */
    height: 65px;  /* Make the cards shorter */
}

.pal-card:hover {
    transform: translateY(-5px);
}

.pal-card.found {
    background: rgba(96, 214, 100, 0.95);
}

.pal-card.missing {
    background: rgba(207, 114, 236, 0.534);
}

.pal-icon {
    width: 90px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 10px;
}

.pal-name {
    font-size: 16px;
    color: #ffffff;
    margin: 5px 0;
}

.pal-type {
    font-size: 14px;
    color: #666;
}

.completion-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #763bd3dc;
    padding: 30px;
    border-radius: 20px;
    border: 3px solid #ffffff;
    color: white;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

.completion-modal.show {
    display: block;
}

/* Add overlay */
.completion-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.modal-content {
    padding: 20px;
}

.modal-content h2 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #ffd700;
}

.modal-content p {
    font-size: 18px;
    margin: 10px 0;
}

.completion-time {
    font-size: 24px;
    margin: 20px 0;
    color: #ffd700;
    font-family: 'Ubuntu', monospace;
}

.restart-button {
    margin-top: 20px;
    padding: 12px 25px;
    background: #ffd700;
    border: none;
    border-radius: 20px;
    color: #333;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s;
}

.restart-button:hover {
    background: #ffed4a;
    transform: translateY(-2px);
}

.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    color: white;
}

.social-links {
    margin-bottom: 20px;
}

.social-link {
    color: white;
    font-size: 28px;
    margin: 0 15px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.social-link:hover {
    opacity: 0.8;
}

.copyright {
    margin: 15px 0;
    font-size: 16px;
}

.privacy-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.2s;
}

.privacy-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

@media (max-width: 768px) {
    h1 {
        font-size: 48px;
    }
    
    .subtitle {
        font-size: 22px;
    }
    
    .timer {
        font-size: 28px;
    }
    
    .timer-container {
        max-width: 150px;
    }
    
    .stats-bar {
        gap: 20px;
        padding: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 10px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-select {
        width: 100%;
        max-width: 300px;
    }
    
    .completion-modal {
        width: 90%;
        max-width: 300px;
        padding: 20px;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .completion-time {
        font-size: 20px;
    }
}
html {
    overflow-y: scroll;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4AA7FF;
    border-radius: 10px;
    border: 3px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: #3590e3;
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #4AA7FF rgba(255, 255, 255, 0.1);
}

/* Ensure minimum content height for scrollbar */
.container {
    min-height: 100vh;
    padding-bottom: 50px; /* Add some bottom padding */
}

/* Ensure footer stays at bottom */
footer {
    margin-top: auto;
    padding-bottom: 20px;
}
.menu-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.menu-container.show {
    display: block;
}

.menu-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #4AA7FF;
    color: white;
}

header h1 {
    cursor: pointer;
    position: relative;
}
.how-to-play-modal {
    display: none;
    position: fixed; /* Change to fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Add overlay */
    z-index: 1002;
}

.how-to-play-content {
    position: relative;
    background-color: #3e1a5f !important;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border: 2px solid #45d2fd !important;
    border-radius: 10px;
}
S

.how-to-play-modal {
    display: none;
    position: absolute;
    z-index: 1002;
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
    width: 295%; /* Increased from 90% */
    max-width: 1800px; /* Increased from 600px */
}

.how-to-play-content {
    background-color: #2d5a27;
    margin: 0 auto;
    padding: 20px 30px; /* Added more horizontal padding */
    border: 2px solid #ffd700;
    border-radius: 10px;
    color: white;
    font-family: monospace;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-how-to-play {
    color: #ffd700;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-how-to-play:hover {
    color: #fff;
}

.how-to-play-text {
    margin-top: 20px;
    text-align: left; /* Add this line */
    font-size: 16px; /* Base font size for all text */
}

.green-text { color: #60d664; }
.yellow-text { color: #FFD93D; } /* Changed from orange-text */
.red-text { color: #e93a3a; }

.how-to-play-text h3 {
    color: #ffd700;
    margin-top: 20px;
}

.how-to-play-text ul {
    list-style-type: none;
    padding-left: 20px;
}

.how-to-play-text li {
    margin: 10px 0;
}
.help-button {
    position: relative;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 1000;
}
.share-box {
    margin-top: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.share-button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    transition: opacity 0.2s;
}

.copy-button {
    background-color: #4a4a4a;
}

.twitter-button {
    background-color: #1DA1F2;
}

.share-button:hover {
    opacity: 0.8;
}
.info-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.info-modal-content {
    background-color: #3e1a5f;
    margin: 15% auto;
    padding: 20px;
    border: 2px solid #45d2fd;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
    color: white;
}

.info-modal-content h2 {
    color: #ffd700;
    margin-top: 20px;
    margin-bottom: 10px;
}

.info-modal-content h2:first-child {
    margin-top: 0;
}

.info-modal-content p {
    margin: 10px 0;
    line-height: 1.5;
}

.close-info {
    color: #ffd700;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-info:hover {
    color: white;
}

.copy-email {
    cursor: pointer;
    color: #4AA7FF;
    text-decoration: underline;
    display: inline-block;
}

.copy-email:hover {
    color: #3590e3;
}

.coffee-link {
    color: #4AA7FF;
    text-decoration: none;
}

.coffee-link:hover {
    text-decoration: underline;
    color: #3590e3;
}
.how-to-play-content h2 {
    text-align: center;
    margin: 0 0 20px 0;
    padding-right: 30px; /* This accounts for the X button */
    color: #ffd700;
}
.game-menu-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}
  
.menu-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(116, 116, 223);
    border: 2px solid rgb(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
}
  
.menu-button:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}
  
.menu-button i {
    font-size: 24px;
    color: #ffffff;
}

.menu-button::before {
    content: attr(title);
    position: absolute; /* Change back to absolute */
    bottom: 100%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}
  
.menu-button:hover::before {
    opacity: 1;
    visibility: visible;
}
.game-title {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    padding: 10px;
}