/* 1. Global Reset & Background */
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    /* Soft gradient that feels premium */
    background: radial-gradient(circle at top, #ffffff, #dbe2e8);
}

/* 2. Main Container */
.container {
    background-color: #1C3144;
    text-align: center;
    border-radius: 24px;
    padding: 20px;
    max-width: 600px; /* Keeps UI from stretching too wide on desktop */
    margin: 20px auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

#scores {
    color: #F7DBA7; /* Gold accent */
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* 3. Match-em Interaction Styles */
.matchem_row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

.selectable, .unselectable {
    flex: 1;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-weight: 600;
}

.question { 
    background-color: #C57B57; /* Terracotta */
    color: white; 
}

.answer { 
    background-color: #F7DBA7; /* Soft Gold */
    color: #1C3144; 
}

/* Interaction States */
.picked {
    background-color: #ffffff !important;
    color: #1C3144 !important;
    transform: scale(0.95);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.correct {
    background-color: #4CAF50 !important;
    color: white !important;
    opacity: 0.6;
    cursor: default;
}

/* 4. Flashcards & Lists */
.flashcard, .flashlist {
    background-color: #ffffff;
    width: 90%;
    margin: 20px auto;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    border-top: 6px solid #C57B57;
    transition: transform 0.3s ease;
}

.flashcard { height: 60vh; } /* Slightly shorter for better UI balance */

.flashcard div {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.flashcard div:first-child {
    font-size: 2rem;
    color: #1C3144;
    border-bottom: 1px solid #eee;
}

/* 5. Inputs & Multiple Choice (One-to-Four) */
.one-to-four-question, .typing-questions {
    background-color: #3e5c76;
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.one-to-four-option, .typing-input, .typing-submit {
    width: 100%;
    height: 55px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
}

.one-to-four-option {
    background-color: white;
    color: #1C3144;
    font-weight: bold;
    box-shadow: 0 4px 0 #bdc3c7;
}

.one-to-four-option:active {
    transform: translateY(3px);
    box-shadow: none;
}

.typing-input input {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 2px solid #ddd;
    padding: 0 15px;
    text-align: center;
}

.typing-submit {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

/* 6. Controls */
#flash-control {
    display: flex;
    gap: 15px;
    width: 90%;
    margin: 0 auto;
}

#flash-control div {
    flex: 1;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    color: #1C3144;
    cursor: pointer;
    box-shadow: 0 4px 0 #bdc3c7;
}

#flash-control div:active {
    transform: translateY(2px);
    box-shadow: none;
}

.hidden { display: none !important; }