:root {
    --primary-glow: #6c5ce7;
    --secondary-glow: #00cec9;
    --accent-color: #ff7675;
    --dark-bg: #0f0c1b;
    --bg: #ffffff;
    --text: #121213;
    --border: #e5e7eb;
    --absent: #71717a;
    --present: #eab308;
    --correct: #22c55e;
    --key-bg: #a5bce8;
    --key-text: #1a1a1b;
    --tile-text: #1a1a1b;
    --tile-border: #d1d5db;
    --header-border: #f3f4f6;
    --accent: #3b82f6;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--dark-bg);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* GAMIFIED ANIMATED BACKGROUND */
.game-bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #231942 0%, #0f0c1b 100%);
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(0, 206, 201, 0.15));
    border-radius: 8px;
    animation: floatAround 20s linear infinite;
    bottom: -100px;
}

@keyframes floatAround {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

@keyframes upDown {
    0%, 100% { transform: translateY(0); }
    20%, 60% { transform: translateY(-6px); }
    40%, 80% { transform: translateY(6px); }
} 
/*  GAME CONTAINER & PANELS  */
.game-container {
    max-width: 900px;
    margin-top: 2rem;
    margin-bottom: 2rem;

    animation: upDown 4s infinite ease-in-out;
    animation-delay: 2000;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),  inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.arcade-font {
    font-family: 'Press Start 2P', cursive;
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Arcade Style Buttons */
.btn-game {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 12px 28px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 6px 0 #4834d4, 0 12px 20px rgba(108, 92, 231, 0.4);
    transition: all 0.1s ease;
}

.btn-game:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #4834d4, 0 8px 15px rgba(108, 92, 231, 0.4);
    color: white;
}

.btn-game:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #4834d4, 0 4px 10px rgba(108, 92, 231, 0.2);
}

.btn-game-secondary {
    background: linear-gradient(135deg, #00cec9, #81ecec);
    box-shadow: 0 6px 0 #009797, 0 12px 20px rgba(0, 206, 201, 0.3);
}
.btn-game-secondary:hover { box-shadow: 0 4px 0 #009797; }


p, span { color: whitesmoke; }

/* Worldle board code  */
#game-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px;
}

#board-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 8px;
}

#board .row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.tile {
    width: clamp(48px, 13vw, 62px);
    height: clamp(48px, 13vw, 62px);
    border: 2px solid var(--tile-border);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.4rem, 6vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    user-select: none;
    transition: transform 0.1s linear, background-color 0.4s ease, border-color 0.4s ease;
}

.tile[data-state="active"] {
    color: whitesmoke;
    border-color: rgb(213, 213, 213);
    transform: scale(1.05);
}

.tile.pop {
    transform: scale(1.15);
}

.tile.flip {
    transform: rotateX(90deg);
}

.tile[data-state="absent"] {
    background-color: var(--absent);
    border-color: var(--absent);
    color: white;
}

.tile[data-state="present"] {
    background-color: var(--present);
    border-color: var(--present);
    color: white;
}

.tile[data-state="correct"] {
    background-color: var(--correct);
    border-color: var(--correct);
    color: white;
}

#keyboard {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    padding: 15px 0;
    flex-shrink: 0;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    background-color: var(--key-bg);
    color: var(--key-text);
    border: none;
    border-radius: 6px;
    height: clamp(48px, 7vh, 60px);
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: clamp(0.75rem, 3.5vw, 1rem);
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.1s;
}

.key:active {
    transform: translateY(2px);
    filter: brightness(0.9);
}

.key.large {
    flex: 1.5;
    font-size: 0.8rem;
}

.key[data-state="absent"] {
    background-color: #3f3f46;
    color: white;
}

.key[data-state="present"] {
    background-color: var(--present);
    color: white;
}

.key[data-state="correct"] {
    background-color: var(--correct);
    color: white;
}

#message-container {
    position: fixed;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    pointer-events: none;
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.toast {
    background-color: #b80594;
    color: white;
    padding: 16px 30px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}



.btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary {
    background-color: var(--correct);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0px #16a34a;
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px #16a34a;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    margin-top: 15px;
    opacity: 0.8;
}

#game-over-msg {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 16px;
    background: #f1f5f9;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.no-display {
    opacity: 0;
}

