@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@700&display=swap');

:root {
    --primary-color: #4a4e69;
    --secondary-color: #9a8c98;
    --background-color: #f2e9e4;
    --text-color: #22223b;
    --accent-color: #c9ada7;
}

body {
    font-family: 'Heebo', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

#logo-container {
    text-align: center;
    margin-top: 20px;
}

#game-logo {
    font-family: 'Amatic SC', cursive;
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

h1 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h2 {
    color: var(--primary-color);
    text-align: center;
    font-weight: 700;
}

#game-container {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    margin-top: 20px;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Heebo', sans-serif;
    font-weight: 700;
    margin: 10px 0;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    font-family: 'Heebo', sans-serif;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(74, 78, 105, 0.2);
}

#game, #settings, #add-question, #results, #add-multiple-questions {
    display: none;
}

#question-container {
    background-color: var(--accent-color);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#question {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

#timer-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 20px auto;
}

#timer-svg {
    transform: rotate(-90deg);
}

#timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

#score-board {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    flex-wrap: wrap;
}

.score-item {
    text-align: center;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    margin: 5px;
}

#result {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

#settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#settings-btn:hover {
    background-color: var(--secondary-color);
    transform: rotate(90deg);
}

#results {
    text-align: center;
}

#results h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#results .player-result {
    background-color: var(--accent-color);
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
    font-size: 1.2rem;
}

#results .winner {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

#results .stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

#results .stat-item {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
}

.answer-option {
    display: block;
    width: 100%;
    text-align: right;
    margin: 10px 0;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.answer-option:hover {
    background-color: #e0e0e0;
}

.answer-option.selected {
    background-color: var(--secondary-color);
    color: white;
}

#add-multiple-questions textarea {
    height: 150px;
}

#clock-container {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#clock {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--primary-color);
    position: relative;
}

#clock-face {
    width: 100%;
    height: 100%;
    position: relative;
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    background-color: var(--primary-color);
}

#hour-hand {
    width: 4px;
    height: 30px;
}

#minute-hand {
    width: 2px;
    height: 40px;
}

#second-hand {
    width: 1px;
    height: 45px;
    background-color: red;
}

#daf-yomi {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
}