body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.app-container {
    background-color: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 600px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

#question-counter {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
}

.instruction {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}

/* Klokke styling */
#clock-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#clock {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

/* Valgte ord visning */
#selected-words {
    min-height: 50px;
    background-color: #f8f9fa;
    border: 2px solid #43cea2;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 1.3em;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

#selected-words .placeholder {
    color: #999;
    font-style: italic;
}

/* Ord grid */
.word-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    min-height: 80px;
}

.word-btn {
    background-color: #43cea2;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.word-btn:hover:not(:disabled) {
    background-color: #3ab890;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.word-btn:active:not(:disabled) {
    transform: translateY(0px);
}

.word-btn.selected {
    background-color: #ccc;
    cursor: not-allowed;
}

.word-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Feedback */
#feedback {
    margin: 20px 0;
    font-size: 1.15em;
    font-weight: bold;
    min-height: 1.5em;
}

#feedback.correct {
    color: #27ae60;
}

#feedback.incorrect {
    color: #e74c3c;
}

.feedback-icon {
    font-size: 1.3em;
    margin-right: 5px;
}

.feedback-answer {
    margin-top: 8px;
    font-size: 0.95em;
}

.feedback-answer strong {
    color: #43cea2;
}

.feedback-explanation {
    margin-top: 6px;
    font-size: 0.85em;
    font-weight: normal;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* Knapper */
.button-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.button {
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: 500;
}

.primary-btn {
    background-color: #27ae60;
    color: white;
}

.primary-btn:hover {
    background-color: #219d55;
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: #e74c3c;
    color: white;
}

.secondary-btn:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

#next-btn, #restart-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.05em;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.2s ease;
}

#next-btn:hover, #restart-btn:hover {
    background-color: #219d55;
}

/* Resultater */
#score-container h2 {
    color: #333;
    margin-bottom: 15px;
}

#score-container p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 15px;
}

#score-container p strong {
    color: #43cea2;
    font-size: 1.2em;
}

/* Tilbake-knapp */
.back-button {
    display: inline-block;
    padding: 10px 15px;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 0.9em;
}

.back-button:hover {
    background-color: #e0e0e0;
}

/* Responsiv design */
@media (max-width: 600px) {
    .app-container {
        padding: 20px 25px;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    .instruction {
        font-size: 1em;
    }
    
    #clock {
        width: 200px;
        height: 200px;
    }
    
    #selected-words {
        font-size: 1.1em;
        min-height: 45px;
        padding: 12px;
    }
    
    .word-btn {
        padding: 10px 16px;
        font-size: 0.95em;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
    }
    
    #feedback {
        font-size: 1em;
    }
    
    .feedback-icon {
        font-size: 1.2em;
    }
    
    .feedback-answer {
        font-size: 0.9em;
        margin-top: 6px;
    }
    
    .feedback-explanation {
        font-size: 0.8em;
        margin-top: 5px;
    }
}
