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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    max-width: 800px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    backdrop-filter: blur(10px);
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5em;
    color: #4a5568;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.2em;
    color: #718096;
}

.menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.mode-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.1em;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.mode-card h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

.quiz-section {
    display: none;
}

.quiz-section.active {
    display: block;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.score {
    background: #48bb78;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
}

.continent {
    background: #ab87d8;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
}

.back-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #c53030;
    transform: translateY(-2px);
}

.question-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
}

.question {
    font-size: 1.4em;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 25px;
    text-align: center;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-align: center;
}

.option:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.option.correct {
    background: #c6f6d5;
    border-color: #48bb78;
    color: #22543d;
}

.option.incorrect {
    background: #fed7d7;
    border-color: #e53e3e;
    color: #742a2a;
}

.next-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 20px auto;
    display: none;
    transition: all 0.3s ease;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.learn-section {
    display: none;
}

.learn-section.active {
    display: block;
}

.learn-list {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.learn-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.1em;
}

.learn-item:last-child {
    border-bottom: none;
}

.learn-item .country {
    font-weight: bold;
    color: #2d3748;
}

.learn-item .capital {
    color: #4a5568;
}

/* Settings Drawer */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1001;
}

.settings-btn:hover {
    transform: scale(1.1);
}

.settings-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    padding: 80px 30px 30px;
    z-index: 1000;
    overflow-y: auto;
}

.settings-drawer.open {
    right: 0;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

.settings-overlay.active {
    display: block;
}

.settings-group {
    margin-bottom: 30px;
}

.settings-group h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.settings-group label {
    display: block;
    color: #4a5568;
    margin-bottom: 5px;
}

.settings-group input, .settings-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        width: 95%;
    }

    .header h1 {
        font-size: 2em;
    }

    .quiz-header {
        flex-direction: column;
        text-align: center;
    }

    .options {
        grid-template-columns: 1fr;
    }

    .settings-drawer {
        width: 300px;
        right: -300px;
    }
}