/* Fixed viewport base - no scrolling */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #f8f8f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Animated chess pieces background */
#chess-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-piece {
    position: absolute;
    opacity: 0.08;
    animation: float-piece 20s infinite ease-in-out;
}

@keyframes float-piece {
    0%, 100% {
        transform: translateY(0) rotate(var(--init-rotation, 0deg));
    }
    25% {
        transform: translateY(-20px) rotate(calc(var(--init-rotation, 0deg) + 5deg));
    }
    50% {
        transform: translateY(0) rotate(var(--init-rotation, 0deg));
    }
    75% {
        transform: translateY(-20px) rotate(calc(var(--init-rotation, 0deg) - 5deg));
    }
}

/* Scaling container - fixed 1920x1080 design that scales to fit viewport */
.scaling-container {
    position: fixed;
    width: 1920px;
    height: 1080px;
    transform-origin: top left;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
    scrollbar-width: thick;
    scrollbar-color: #185a9d #e0e6ef;
    direction: rtl;
}

.scaling-container::-webkit-scrollbar {
    width: 18px;
}

.scaling-container::-webkit-scrollbar-track {
    background: #e0e6ef;
    border-radius: 9px;
    margin: 4px;
}

.scaling-container::-webkit-scrollbar-thumb {
    background: #185a9d;
    border-radius: 9px;
    border: 3px solid #e0e6ef;
}

.scaling-container::-webkit-scrollbar-thumb:hover {
    background: #0d3a5f;
    border: 2px solid #e0e6ef;
}

/* Main container layout - fixed pixel values for 1920x1080 */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 1920px;
    min-height: 1080px;
    padding: 120px 100px 40px 435px;
    gap: 30px;
    direction: ltr;
}

/* Top row: Daily and Unlimited side by side */
.top-row {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    flex: 1;
}

/* Bottom row: Monthly (full width) */
.bottom-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 0 0 200px;
    gap: 30px;
}

/* Mode containers */
.mode-container {
    background: #fafdff;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(24,90,157,0.08);
    border: 1.5px solid #e0e6ef;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.mode-container:hover {
    box-shadow: 0 10px 40px rgba(24,90,157,0.12);
    transform: translateY(-4px);
}

/* Daily container */
.daily-container {
    flex: 1;
    min-width: 0;
}

/* Unlimited container */
.unlimited-container {
    flex: 1;
    min-width: 0;
}

/* Monthly container */
.monthly-container {
    width: 100%;
}

/* Extra container (under monthly) */
.extra-container {
    width: 100%;
    margin-left: 0;
}

/* Mode header */
.mode-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e6ef;
    min-height: 60px;
}

.mode-title {
    font-size: 42px;
    font-weight: 700;
    color: #185a9d;
    letter-spacing: 0.5px;
    margin: 0;
}

.infinity-symbol {
    font-size: 48px;
    color: #185a9d;
    font-weight: bold;
    line-height: 1;
}

/* Countdown timer */
.countdown-timer {
    font-size: 42px;
    font-weight: 700;
    padding-left: 20px;
    color: #185a9d;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
}

/* Mode content */
.mode-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 16px;
}

/* Puzzle link */
.puzzle-link {
    text-decoration: none;
    display: block;
    width: 100%;
    transition: transform 0.2s;
}

/* Puzzle preview - make it relative for absolute child */
.puzzle-preview {
    cursor: pointer;
    max-width: 400px;
    margin: 0 auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    background: #fff;
    position: relative;
}

.puzzle-preview svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Restore hover effect for puzzle preview */
.puzzle-link:hover .puzzle-preview,
.puzzle-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
}

.puzzle-link:hover {
    transform: scale(1.02);
}

/* Puzzle ID text - center over puzzle preview */
.puzzle-id-text {
    color: #185a9d;
    font-weight: 600;
    font-size: 20px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    background: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 2;
}

/* Error text */
.error-text {
    color: #d22;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

/* Game subtitle (now blue, no underline) */
.game-subtitle {
    font-size: 32px;
    font-weight: 700;
    color: #185a9d;
    text-align: center;
    margin: 0 0 16px 0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(24, 90, 157, 0.08);
    position: relative;
    padding-bottom: 0;
}

/* Player container */
.player-container {
    width: 100%;
}

/* Player link */
.player-link {
    text-decoration: none;
    display: block;
    width: 100%;
    transition: transform 0.2s;
}

/* Player images container */
.player-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.player-images:hover {
    transform: scale(1.05);
}

/* Individual player image */
.player-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, filter 0.3s ease;
    filter: blur(12px);
}

.player-image:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    filter: blur(10px);
}

/* Footer styles */
.site-footer {
    width: 100%;
    background: #fafdff;
    border-top: 2px solid #e0e6ef;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 -2px 12px rgba(24,90,157,0.06);
    padding: 32px 0 24px 0;
    margin-top: 30px;
    text-align: center;
    font-size: 18px;
    color: #185a9d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    margin-bottom: 8px;
}

.footer-links a {
    color: #185a9d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    font-size: 18px;
}

.footer-links a:hover {
    color: #0d3a5f;
    text-decoration: underline;
}

.footer-version,
.footer-powered,
.footer-copyright {
    font-size: 16px;
    color: #185a9d;
    margin: 0;
}

.footer-powered {
    font-size: 15px;
    color: #185a9d;
}

.footer-copyright {
    font-size: 15px;
    color: #185a9d;
    margin-top: 6px;
}

/* Calendar icon styling */
.calendar-icon-link {
    color: #185a9d;
    font-size: 32px;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    line-height: 1;
}

.calendar-icon-link:hover {
    color: #8ca2ad;
}

/* Random game button */
.random-game-button {
    padding: 30px 40px;
    background: #fafdff;
    border: 2px solid #185a9d;
    border-radius: 12px;
    color: #185a9d;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 400px;
    margin: 0 auto;
}

.random-game-button:hover {
    background: #185a9d;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(24, 90, 157, 0.3);
}

/* Alpha notice styles */
.alpha-notice {
    position: absolute;
    top: 100px;
    left: 32px;
    z-index: 100;
    background: #185a9d;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(24,90,157,0.12);
    opacity: 0.97;
    pointer-events: none;
    user-select: none;
    letter-spacing: 0.5px;
    text-align: left;
    max-width: 320px;
    width: 320px;
    min-width: 0;
    line-height: 1.35;
}

/* Banner nav dropdown styles */
.banner-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: 48px;
}
.banner-nav-item {
    position: relative;
    font-size: 1.25rem;
    font-weight: 600;
    color: #185a9d;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 8px;
    transition: background 0.2s;
}
.banner-nav-item:hover {
    background: #eaf6ff;
}
.banner-nav-dropdown {
    display: none;
    position: absolute;
    top: 100%; /* was 110%, now flush with nav item */
    left: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(24,90,157,0.10);
    border-radius: 10px;
    min-width: 160px;
    z-index: 999;
    flex-direction: column;
    padding: 8px 0;
}
.banner-nav-item:hover .banner-nav-dropdown {
    display: flex;
}
.banner-nav-link {
    color: #185a9d;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 24px;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}
.banner-nav-link:hover {
    background: #eaf6ff;
}
/* Sign-in button styles */
.banner-signin-btn {
    position: relative;
    background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 22px;
    cursor: pointer;
    margin-right: 18px;
    transition: background 0.2s;
}
.banner-signin-btn:hover {
    background: linear-gradient(90deg, #185a9d 0%, #43cea2 100%);
}
.banner-signin-tooltip {
    display: none;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #185a9d;
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 1rem;
    white-space: nowrap;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(24,90,157,0.12);
}
.banner-signin-btn:hover .banner-signin-tooltip {
    display: block;
}