/* Allgemeine Stile */
:root {
    --orange: #FF9933;
    --light-orange: #FFCC99;
    --light-gray: #F2F2F2;
    --white: #FFFFFF;
    --dark-gray: #666666;
}

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

body {
    font-family: 'Comic Neue', cursive;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Header */
header {
    background-color: var(--orange);
    color: var(--white);
    padding: 20px;
    border-radius: 10px 10px 0 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.timer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.timer {
    background-color: var(--white);
    color: var(--orange);
    font-size: 1.8rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button {
    background-color: var(--white);
    color: var(--orange);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Comic Neue', cursive;
}

button:hover {
    background-color: var(--light-orange);
    transform: scale(1.05);
}

/* Main Content */
main {
    background-color: var(--white);
    padding: 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

/* Welcome Screen */
#welcome-screen {
    text-align: center;
    padding: 20px;
}

#welcome-screen h2 {
    color: var(--orange);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

#welcome-screen p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.mascot {
    margin: 30px auto;
    max-width: 200px;
}

.mascot img {
    width: 100%;
    height: auto;
}

/* Game Screen */
.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.progress-info, .score-info {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--orange);
}

.progress-bar {
    flex-grow: 1;
    height: 20px;
    background-color: var(--light-gray);
    border-radius: 10px;
    margin: 0 20px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background-color: var(--orange);
    width: 0%;
    transition: width 0.3s ease;
}

.question-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background-color: var(--light-gray);
    border-radius: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.question {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--orange);
    margin-bottom: 20px;
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.numpad {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 20px;
}

.numpad-row {
    display: flex;
    gap: 5px;
}

.numpad-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background-color: var(--white);
    color: var(--orange);
    border: 2px solid var(--orange);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.numpad-btn:hover {
    background-color: var(--light-orange);
}

.numpad-btn[data-value="submit"] {
    background-color: var(--orange);
    color: var(--white);
}

.numpad-btn[data-value="clear"] {
    background-color: #FFE0CC;
}

.answer-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

#answer-input {
    padding: 10px;
    font-size: 1.5rem;
    border: 2px solid var(--orange);
    border-radius: 8px;
    width: 120px;
    text-align: center;
    font-family: 'Comic Neue', cursive;
    background-color: var(--white);
}

#feedback {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

#feedback.correct {
    background-color: #DFF2BF;
    color: #4F8A10;
}

#feedback.incorrect {
    background-color: #FFD2D2;
    color: #D8000C;
}

/* Result Screen */
#result-screen {
    text-align: center;
    padding: 20px;
}

#result-screen h2 {
    color: var(--orange);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.result-details {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

#final-score {
    font-weight: bold;
    color: var(--orange);
    font-size: 1.5rem;
}

#trophy-container {
    margin: 20px auto;
    max-width: 200px;
}

#trophy-img {
    width: 100%;
    height: auto;
    animation: shine 2s infinite alternate;
}

@keyframes shine {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.3);
    }
}

#motivation-container {
    margin: 20px auto;
}

#motivation-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--orange);
    margin-bottom: 15px;
}

#play-again {
    font-size: 1.2rem;
    padding: 12px 24px;
}

/* History Section */
.history-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed var(--light-orange);
}

.history-section h3 {
    color: var(--orange);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.calendar-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header button {
    background-color: transparent;
    color: var(--orange);
    box-shadow: none;
    font-size: 1.5rem;
    padding: 5px 10px;
}

.calendar-header h4 {
    font-size: 1.3rem;
    color: var(--dark-gray);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background-color: var(--light-orange);
}

.calendar-day.has-result {
    background-color: var(--light-orange);
}

.calendar-day.has-trophy {
    background-color: var(--orange);
    color: var(--white);
}

.calendar-day.has-trophy::after {
    content: "🏆";
    font-size: 0.7rem;
    position: absolute;
    top: 2px;
    right: 2px;
}

.calendar-day.today {
    border: 2px solid var(--orange);
}

.day-details {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 10px;
    text-align: center;
}

.day-details h4 {
    color: var(--orange);
    margin-bottom: 10px;
}

#day-trophy {
    margin-top: 10px;
}

#day-trophy img {
    width: 50px;
    height: auto;
}

.day-questions-container {
    margin-top: 20px;
    text-align: left;
}

.day-questions-container h5 {
    color: var(--orange);
    margin-bottom: 10px;
    text-align: center;
}

.day-questions-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-item {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-item.correct {
    background-color: #DFF2BF;
    color: #4F8A10;
}

.question-item.incorrect {
    background-color: #FFD2D2;
    color: #D8000C;
}

.question-item .question-text {
    font-weight: bold;
}

.question-item .answer {
    margin-left: 10px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .timer {
        font-size: 1.5rem;
    }
    
    .question {
        font-size: 2rem;
    }
    
    .progress-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-bar {
        width: 100%;
        margin: 10px 0;
    }
    
    .calendar-container {
        padding: 10px;
    }
    
    .weekdays div, .calendar-day {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .question {
        font-size: 1.8rem;
    }
    
    #answer-input {
        width: 100px;
        font-size: 1.3rem;
    }
    
    .calendar-days {
        gap: 2px;
    }
}
