html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}
body {
    background-image: url('/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    text-align: center; /* Centers all text by default (inherits to h1, p, etc.) */
    align-items: center; /* Centers flex children horizontally (e.g., divs with limited width) */
}
@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
    }
    #gameInterface {
        height: auto;
        min-height: 100vh;
    }
}
.neon-button {
    background: linear-gradient(to bottom, #ffeb3b, #ffc107); /* MODIFIED: Softer gradient for a brighter, more vibrant iOS-like pop */
    color: black;
    font-weight: bold;
    border-radius: 1.5rem; /* MODIFIED: Increased for more bubbly, rounded corners like iOS buttons */
    padding: 0.6rem 1.2rem; /* MODIFIED: Increased vertical padding for less "thin" feel; balanced horizontal to avoid "wide" stretch */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5); /* MODIFIED: Added subtle outer shadow for depth and inner glow for bubbly shine */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; /* MODIFIED: Smoother, longer transition; added background for fade effect */
    font-size: 0.9rem; /* MODIFIED: Slightly larger font for better readability and iOS feel */
    border: none; /* MODIFIED: Removed border for cleaner, smoother look (iOS buttons often borderless) */
    cursor: pointer;
    pointer-events: auto;
    will-change: transform, box-shadow; /* NEW: Improves smoothness on hover/animations */
    -webkit-font-smoothing: antialiased; /* NEW: Smoother text rendering, like iOS */
}
.neon-button:hover {
    transform: scale(1.08); /* MODIFIED: Slightly larger scale for more "pop" on hover */
    box-shadow: 0 6px 12px rgba(255, 152, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6); /* MODIFIED: Enhanced shadow for depth and glow */
    background: linear-gradient(to bottom, #fff59d, #ffb74d); /* NEW: Lighter gradient on hover for a bright, popping effect */
}
.game-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #ff9800;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    text-align: left; /* Overrides body centering for game cards to keep internal text left-aligned if desired */
}
.game-card:hover {
    transform: translateY(-3px);
}
.modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    padding-top: 40px;
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 10px;
    width: 90%;
    max-width: 400px;
    border-radius: 0.75rem;
    border: 1px solid #ff9800;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    position: relative;
    z-index: 51;
}
.close {
    color: #aaa;
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    pointer-events: auto;
}
.nft-item {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease;
    pointer-events: auto;
    z-index: 52;
}
.nft-item:hover {
    transform: scale(1.05);
}
.nft-item img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid #ff9800;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#videoOverlay {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 70;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
#videoOverlay.fade-in {
    opacity: 1;
}
#videoOverlay.fade-out {
    opacity: 0;
}
.info-button {
    background-color: #ff9800;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    font-size: 0.6rem;
    border: 1px solid #fff;
}
.info-button:hover {
    transform: scale(1.1);
}
.status-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
#loadingScreen.show {
    opacity: 1;
}
#loadingScreen.hide {
    opacity: 0;
    pointer-events: none;
}
#loadingText {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px #ff9800;
    animation: fadeText 1.5s infinite;
    border: 2px solid #ff9800;
    padding: 10px;
    border-radius: 0.5rem;
}
@keyframes fadeText {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
#openGamesList {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff9800 #f0f0f0;
}
#openGamesList::-webkit-scrollbar {
    width: 8px;
}
#openGamesList::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}
#openGamesList::-webkit-scrollbar-thumb {
    background: #ff9800;
    border-radius: 4px;
}
#resultsButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(to right, #ff0000, #ff4500);
    color: white;
    font-weight: bold;
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 80;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
}
#resultsButton:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(255, 69, 0, 0.5);
}
#resultsNotification {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#resultsModalList {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff9800 #f0f0f0;
}
#resultsModalList::-webkit-scrollbar {
    width: 8px;
}
#resultsModalList::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}
#resultsModalList::-webkit-scrollbar-thumb {
    background: #ff9800;
    border-radius: 4px;
}
#animationNFTs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}
#animationNFTs img {
    width: 64px;
    height: 64px;
    border-radius: 0.5rem;
    border: 1px solid #ff9800;
}
/* Center the game interface container */
#gameInterface {
    max-width: 480px; /* Adjust as needed for your design; prevents full-width stretch */
    margin: 0 auto;
    padding: 1rem; /* Adds some breathing room around the edges */
}
/* Optional override for specific elements that should remain left-aligned */
.space-y-4 { /* Targets the div inside #gameInterface */
    text-align: left; /* If you want lists/buttons left-aligned within the centered container */
}