/* ──────────────────────────── */
/*  Variables & Theme Handling  */
/* ──────────────────────────── */
:root {
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #2f3542;
    --text-secondary: #747d8c;
    --primary: #4a6cf7;
    --primary-dark: #3651d4;
    --secondary: #5352ed;
    --danger: #ff4757;
    --danger-dark: #d63a49;
    --danger-light: #ff6b6b;
    --warning: #feca57;
    --accent: #48dbfb;
    --border: #e9ecef;
    --shadow: rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --radius: 12px;
}
[data-theme="dark"] {
    --bg: #14151a;
    --card-bg: #1e2028;
    --text: #f5f6fa;
    --text-secondary: #a4b0be;
    --primary: #6a89ff;
    --primary-dark: #526ad4;
    --secondary: #5352ed;
    --danger: #ff6b81;
    --danger-dark: #e05566;
    --danger-light: #ff8a95;
    --warning: #ffda79;
    --accent: #54a0ff;
    --border: #2f3542;
    --shadow: rgba(0,0,0,0.5);
}

/* ──────────────────────────── */
/*    Reset & Base Styles      */
/* ──────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    line-height: 1.6;
    transition: var(--transition);
}

#app {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
    flex-grow: 1;
}

/* ──────────────────────────── */
/*       Header & Navigation    */
/* ──────────────────────────── */
.top-bar {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-family: "Orbitron", sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: -5px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dropdown menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropbtn:hover {
    background-color: var(--primary-dark);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 8px 16px 0 var(--shadow);
    border-radius: var(--radius);
    z-index: 1;
    padding: 1rem;
    border: 1px solid var(--border);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.icon-btn {
    font-size: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: var(--transition);
}

.icon-btn:hover {
    transform: scale(1.1);
}

.lang-select {
    padding: 0.25rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-family: "Poppins", sans-serif;
}

.full-btn {
    width: 100%;
    padding: 0.6rem;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    margin-top: 0.5rem;
    transition: var(--transition);
}

.full-btn:hover {
    background: var(--primary);
    color: white;
}

/* ──────────────────────────── */
/*       Card Container        */
/* ──────────────────────────── */
.card {
    background: var(--card-bg);
    width: 100%;
    margin: 1rem 0;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
}

/* ──────────────────────────── */
/*     Typography & Forms      */
/* ──────────────────────────── */
.section-title {
    font-family: "Orbitron", sans-serif;
    font-size: 1.8rem;
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.instructions {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
    font-family: "Poppins", sans-serif;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.team-input {
    margin-bottom: 0.5rem;
}

/* ──────────────────────────── */
/*        Button Styles        */
/* ──────────────────────────── */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary {
    background: var(--primary);
    color: #fff;
}

.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.secondary {
    background: var(--secondary);
    color: #fff;
}

.secondary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.danger {
    background: var(--danger);
    color: #fff;
}

.danger:hover {
    background: var(--danger-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* ──────────────────────────── */
/*       Color Board Styles     */
/* ──────────────────────────── */
.board-container {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
}

.board {
    display: grid;
    grid-template-columns: repeat(24, 20px);
    grid-template-rows: repeat(20, 20px);
    gap: 1px;
    margin: 20px auto;
    max-width: fit-content;
    overflow-x: auto;
    justify-content: center;
}

.cell {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.cell:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 0 8px var(--shadow);
}

.selected {
    border: 3px solid black;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.guess {
    border: 3px solid var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.clue-container {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.clue {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--primary);
}

.game-controls {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.result-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.8rem;
    background: var(--bg);
    border-radius: var(--radius);
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.result-display:not(:empty) {
    opacity: 1;
}

/* ──────────────────────────── */
/*          Scoreboard         */
/* ──────────────────────────── */
.scoreboard {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.scoreboard div {
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    transition: var(--transition);
}

.scoreboard div.current {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ──────────────────────────── */
/*           Modal             */
/* ──────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 5px 15px var(--shadow);
    max-width: 600px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    top: 0.8rem;
    right: 1.2rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
}

.close:hover {
    color: var(--danger);
}

.modal h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.modal p {
    white-space: pre-line;
    line-height: 1.8;
}

.color-examples {
    margin-top: 1.5rem;
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius);
}

.color-examples h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: var(--text);
}

.color-examples ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.color-examples li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.example-color {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border);
    box-shadow: 0 2px 5px var(--shadow);
}

/* ──────────────────────────── */
/*           Footer            */
/* ──────────────────────────── */
footer {
    width: 100%;
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ──────────────────────────── */
/*      Responsive Design      */
/* ──────────────────────────── */
@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }
    
    .board {
        grid-template-columns: repeat(18, 25px);
        grid-template-rows: repeat(10, 25px);
    }
    
    .cell {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .controls {
        width: 100%;
        justify-content: center;
    }
    
    .board {
        grid-template-columns: repeat(18, 18px);
        grid-template-rows: repeat(10, 18px);
        gap: 1px;
    }
    
    .cell {
        width: 18px;
        height: 18px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
} 