:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #00e5ff; 
    --secondary-color: #ff0055;
    --text-color: #e0e0e0;
    --border-color: #333;
    --grid-border: #666;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

header {
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-color);
    box-sizing: border-box;
    border-bottom: 1px solid var(--border-color);
}

.brand { display: flex; align-items: center; gap: 15px; }
.highlight { color: var(--primary-color); }

.level-badge {
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
}

/* Color for wrong numbers */
.board input.wrong {
    color: #ff0055 !important;
    text-shadow: 0 0 5px #ff0055;
}

/* CSS Art Pop-up */
.popup-art {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: #ff0055;
    color: white;
    padding: 20px 40px;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 10px;
    border: 4px solid white;
    box-shadow: 10px 10px 0px #80002b;
    z-index: 100;
    pointer-events: none; /* User can still click through it */
}

/* Yellow highlight for matching numbers */
.board input.highlight-match {
    background-color: #ffeb3b !important; /* Bright Yellow */
    color: #000 !important; /* Black text for contrast */
    text-shadow: none;
}

/* Add this to your style.css */
.highlight-match {
    background-color: #ffeb3b !important; /* Bright Yellow */
    color: #000 !important; /* Black text for contrast */
}

/* Matching numbers highlight */
.board input.highlight-match {
    background-color: #ffeb3b !important; /* Bright Yellow */
    color: #000 !important; /* Black text for high contrast */
    transition: background-color 0.1s ease;
}

/* Specific style for Hinted cells */
.board input.hinted {
    color: #ffffff !important; /* Pure white */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    font-weight: bold;
	cursor: pointer;
    background: rgba(255, 255, 255, 0.05); /* Slight highlight */
}

/* Subtle pulse animation for the Hint button */
.hint-pulse {
    border: 1px solid var(--primary-color);
    transition: 0.3s;
}

.hint-pulse:hover {
    box-shadow: 0 0 15px var(--primary-color);
    background: var(--primary-color);
    color: black;
}

/* Animation for the pop-up */
.popup-art.show {
    display: block;
    animation: popAndFade 1s ease-out forwards;
}

@keyframes popAndFade {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    20% { transform: translate(-50%, -50%) scale(1.1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

/* Controls & Dropdown */
.game-info {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.dropdown {
    background: var(--surface-color);
    color: white;
    border: 1px solid var(--primary-color);
    padding: 0.5rem;
    border-radius: 4px;
    outline: none;
}

/* Board */
.board {
    display: grid;
    grid-template-columns: repeat(9, 45px); 
    grid-template-rows: repeat(9, 45px);
    border: 3px solid white; /* Bold white outer edge */
    margin: 20px 0;
}

.board input {
    width: 45px; height: 45px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 1.2rem;
    text-align: center;
    caret-color: transparent; /* Hide cursor */
}

/* Penguin Container */
/* Center the penguin inside the board area */
.penguin-container {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers it exactly */
    z-index: 10;
    pointer-events: none;
}

.penguin-container.show {
    display: block;
    animation: penguinBounce 0.5s ease-in-out infinite alternate;
}

/* The Penguin Body */
.penguin {
    position: relative;
    width: 120px;
    height: 150px;
    background: #000; /* Black Body */
    border-radius: 50% 50% 30% 30%;
}

/* The White Tummy */
.penguin::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 20px;
    width: 80px;
    height: 100px;
    background: #fff; /* White Tummy */
    border-radius: 50%;
}

.eye {
    position: absolute;
    top: 40px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    z-index: 2;
}
.eye.left { left: 35px; }
.eye.right { right: 35px; }

/* Pupils */
.eye::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #000;
    border-radius: 50%;
    top: 3px;
    left: 3px;
}

.beak {
    position: absolute;
    top: 60px;
    left: 50px;
    width: 20px;
    height: 15px;
    background: #ff9800; /* Orange Beak */
    border-radius: 50%;
    z-index: 2;
}

@keyframes penguinBounce {
    from { transform: translate(-50%, -50%); }
    to { transform: translate(-50%, -60%); }
}

#sudoku-game-area, #wordle-container {
    display: none; /* Hide both by default */
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* This ensures only the ACTIVE one shows up in the center */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 700px; /* Prevents the page from jumping */
}

#wordle-container {
    /* This ensures it sits in the exact same vertical start point as Sudoku */
    margin-top: 2rem; 
}

#wordle-container iframe {
    max-width: 100%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
	position: relative !important; /* Prevents it from floating over other things */
    z-index: 1;
}

.board input:focus { background: #00e5ff20; border-color: var(--primary-color); outline: none; }
.board input.prefilled { background: #252525; color: #888; font-weight: bold; cursor: pointer; }
.board input.correct { color: #00ff00; }
.board input.wrong { color: #ff0055; }

/* Grid Lines */
/* Vertical white dividers for the 3rd and 6th columns */
.board input:nth-child(3n) { 
    border-right: 3px solid white; 
}

/* Reset the 9th column so it doesn't create a double-thick border on the outer edge */
.board input:nth-child(9n) { 
    border-right: 1px solid var(--border-color); 
}

/* Horizontal white dividers for the 3rd and 6th rows */
.board input:nth-child(n+19):nth-child(-n+27),
.board input:nth-child(n+46):nth-child(-n+54) { 
    border-bottom: 3px solid white; 
}

/* Horizontal white divider for the bottom row */
.board input:nth-child(n+73):nth-child(-n+81) { 
    border-bottom: 3px solid white; 
}


.user-controls {
    display: flex;
    flex-direction: column; /* Stacks children vertically */
	text-align: center;
    /* align-items: flex-end;    /* Aligns buttons to the right (change to 'center' if preferred) */
    gap: 8px;               /* Space between Logout and Share Screen */
}

/* This allows Game Switcher and Share Screen to be side-by-side */
.action-row {
    display: flex;
    flex-direction: row; 
    gap: 10px;
    justify-content: center;
}

#gameSwitcher, #shareBtn {
    min-width: 100px; /* Slightly smaller to fit side-by-side */
}

#logoutBtn, #loginBtn {
    min-width: 120px;
    text-align: center;
}

/* Buttons */
.btn-primary { background: var(--primary-color); color: black; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-secondary { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 6px 12px; border-radius: 4px; cursor: pointer; }
.btn-action { background: #333; color: white; border: 1px solid #555; padding: 10px 20px; cursor: pointer; width: 100%; margin-top: 10px;}

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 10; backdrop-filter: blur(4px); }
.modal-content { background: var(--surface-color); margin: 15% auto; padding: 20px; width: 300px; border: 1px solid var(--border-color); border-radius: 8px; position: relative; }
.close-btn { position: absolute; right: 15px; top: 5px; cursor: pointer; font-size: 24px; }
.full-width { width: 100%; margin-top: 10px; }

input[type="text"], input[type="password"] { width: 100%; padding: 8px; margin: 5px 0; background: black; border: 1px solid #444; color: white; box-sizing: border-box; }


