/* ---------------------------------------------------------
   NYT WORDLE — DARK MODE + SMOOTH CHRISTMAS SNOW THEME
--------------------------------------------------------- */

/* GLOBAL LAYOUT */
body {
    margin: 0;
    padding: 0;
    background: #121213;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #d7dadc;
    overflow-x: hidden;
    text-align: center;
}

/* Hidden admin dot */
#adminLink {
    opacity: 0.03;
    position: fixed;
    bottom: 5px;
    right: 7px;
    cursor: pointer;
    z-index: 5000;
    font-size: 14px;
    user-select: none;
}

/* ---------------------------------------------------------
   HEADER
--------------------------------------------------------- */
header {
    margin-top: 25px;
    margin-bottom: 10px;
}

.title {
    font-size: 44px;
    font-weight: 700;
    color: #ffffff;
}

.santa-hat {
    font-size: 38px;
    vertical-align: middle;
}

.subtitle {
    color: #b3b3b3;
    margin-top: -10px;
    font-size: 16px;
}

/* ---------------------------------------------------------
   REALISTIC, SMOOTH, NON-DISTRACTING SNOW
   Falls behind everything
--------------------------------------------------------- */

#snow {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* BACKGROUND */
    overflow: hidden;
   /* opacity: 0.50; /* subtle */
}

.snowflake {
    position: absolute;
    top: -10vh;
    color: rgba(255, 255, 255, 0.7); /* gentle */
    font-size: 10px;
    user-select: none;
    animation: snowfall linear infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0);
        opacity: 0.3;
    }
    100% {
        transform: translateY(110vh) translateX(20px);
        opacity: 0;
    }
}

/* ---------------------------------------------------------
   NAME SELECT PANEL
--------------------------------------------------------- */
#name-select-section {
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.07);
    padding: 20px 30px;
    width: 320px;
    border-radius: 10px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

#name-select-section h2 {
    margin-bottom: 12px;
    color: #ffffff;
}

#playerSelect,
#startButton {
    font-size: 18px;
    padding: 10px;
    width: 100%;
    margin-top: 10px;
    border-radius: 6px;
}

#playerSelect {
    background: #ffffff;
    border: 1px solid #ccc;
}

#startButton {
    background: #6aaa64; 
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

#startButton:hover {
    background: #558a50;
}

/* ---------------------------------------------------------
   WORDLE GRID — CENTERED PROPERLY
--------------------------------------------------------- */

#board {
    margin: 0 auto;
    margin-top: 20px;
    display: grid;
    gap: 6px;
    width: fit-content;
    z-index: 10;
}

.tile {
    width: 62px;
    height: 62px;
    border: 2px solid #3a3a3c;
    border-radius: 4px;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    background: #121213;
}

/* Tile flip animation */
.flip {
    animation: flip 0.55s ease forwards;
}

@keyframes flip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

/* Tile colors */
.correct {
    background-color: #6aaa64 !important;
    border-color: #6aaa64 !important;
    color: white;
}
.present {
    background-color: #c9b458 !important;
    border-color: #c9b458 !important;
    color: white;
}
.absent {
    background-color: #3a3a3c !important;
    border-color: #3a3a3c !important;
    color: white;
}

/* Shake animation */
.shake {
    animation: shake 0.4s;
}

@keyframes shake {
    10%, 90% { transform: translateX(-3px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60% { transform: translateX(6px); }
}

/* ---------------------------------------------------------
   KEYBOARD — CENTERED AND NYT STYLE
--------------------------------------------------------- */
#keyboard {
    margin: 30px auto;
    width: fit-content;
    z-index: 10;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.key {
    background: #818384;
    color: white;
    border: none;
    margin: 3px;
    padding: 14px 10px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.1s;
}

.key:hover {
    background: #999b9d;
}

.key.wide {
    width: 80px;
}

/* ---------------------------------------------------------
   POPUP MESSAGE (NYT STYLE)
--------------------------------------------------------- */
#message {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff7c2;
    padding: 12px 22px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 18px;
    z-index: 2000;
    color: #1a1a1a;
}
