/* ──────────────────────────── */
/*  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);
}

/* ──────────────────────────── */
/*       Score & Board         */
/* ──────────────────────────── */
.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);
}

.board-container {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
}

.board {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 250px;
    margin: 0 auto 1.5rem;
    background: var(--bg);
    border-radius: 250px 250px 0 0;
    box-shadow: inset 0 5px 15px var(--shadow);
    transition: var(--transition);
}

.target-area {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transition: var(--transition);
}

.needle-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 40px;
    height: 230px;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 2;
}

.needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 230px;
    background: var(--danger);
    transform-origin: bottom center;
    transform: translateX(-50%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.needle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: var(--danger);
    border-radius: 50%;
}

.clues {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 auto 1.5rem;
    width: 100%;
    max-width: 500px;
    padding: 0 1rem;
}

.clue {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    min-width: 100px;
}

.arrow {
    font-size: 1.5rem;
    color: var(--primary);
}

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

.score-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;
}

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

/* ──────────────────────────── */
/*           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;
}

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

/* Footer links styling */
footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ──────────────────────────── */
/*      Responsive Tweaks       */
/* ──────────────────────────── */
@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }
    
    .board {
        max-width: 400px;
        height: 200px;
    }
    
    .needle-container, .needle {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .controls {
        align-self: flex-end;
    }
    
    .board {
        max-width: 300px;
        height: 150px;
    }
    
    .needle-container, .needle {
        height: 140px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .clues {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
}
  