/* CSS Variables for Premium Light Theme */
:root {
    --primary: #d946ef;
    /* Fuchsia */
    --secondary: #8b5cf6;
    /* Violet */
    --accent: #0284c7;
    /* Sky Blue */
    --background: #f8fafc;
    /* Slate 50 */
    --surface: #ffffff;
    --glass-border: #e2e8f0;
    /* Slate 200 */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-dim: #64748b;
    /* Slate 500 */
    --success: #10b981;
    /* Emerald */
    --error: #ef4444;
    /* Red */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--background);
    background-image: radial-gradient(at 0% 0%, rgba(217, 70, 239, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

body {
    color: var(--text-main);
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
}

/* Premium Card (Light) */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05),
        0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Login Page specific */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    background: #f1f5f9;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 1rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
    border-color: var(--secondary);
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

button {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(217, 70, 239, 0.25);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 70, 239, 0.35);
    filter: brightness(1.05);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Admin Table */
.admin-container {
    padding: 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.game-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1.5rem;
}

.game-table th {
    padding: 1rem;
    text-align: left;
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.game-table tr {
    transition: transform 0.2s;
}

.game-table td {
    padding: 1.25rem 1rem;
    background: white;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.game-table td:first-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 12px 0 0 12px;
}

.game-table td:last-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 12px 12px 0;
}

.masked-name {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    letter-spacing: 0.4em;
    color: var(--text-dim);
    word-spacing: 1.5em;
    white-space: pre-wrap;
    font-weight: bold;
}

.revealed {
    color: var(--success);
    word-spacing: normal;
    letter-spacing: normal;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Player Dashboard */
.player-container {
    padding: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-shadow: 2px 2px 0px rgba(139, 92, 246, 0.05);
}

.guess-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.logs {
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 1rem;
    padding-right: 5px;
}

.logs::-webkit-scrollbar {
    width: 6px;
}

.logs::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.log-entry {
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #f1f5f9;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    color: var(--text-main);
    padding: 16px 32px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-family: var(--font-body);
    font-weight: 600;
    animation: fadein 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        fadeout 0.4s 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.error {
    border-left: 5px solid var(--error);
}

.toast.success {
    border-left: 5px solid var(--success);
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeout {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* Modal for Final Score */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    max-width: 550px;
    width: 95%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}