* {
    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;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 900px;
    width: 100%;
    padding: 40px;
    position: relative;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

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

.header p {
    color: #666;
    font-size: 1.1em;
}

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

.progress {
    flex: 1;
    min-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    border-radius: 10px;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.domain-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.domain-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    text-align: center;
}

.domain-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.domain-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 40px;
    min-height: 350px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

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

.card.flipped {
    background: #667eea;
    color: white;
}

.card-content {
    font-size: 1.2em;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-height: 250px;
}

.lang-section {
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.card.flipped .lang-section {
    background: rgba(255, 255, 255, 0.15);
}

.lang-label {
    font-size: 0.75em;
    font-weight: bold;
    opacity: 0.7;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-text {
    font-size: 1em;
    line-height: 1.6;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(102,126,234,0.3), transparent);
    margin: 10px 0;
}

.card.flipped .divider {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.flip-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 0.9em;
    opacity: 0.6;
}

.navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.nav-btn {
    padding: 15px 30px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.bookmark-btn {
    padding: 15px 30px;
    border: 2px solid #ffa726;
    background: white;
    color: #ffa726;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.bookmark-btn.bookmarked {
    background: #ffa726;
    color: white;
}

.bookmark-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,167,38,0.3);
}

.info-section {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.info-section h3 {
    color: #1976d2;
    margin-bottom: 10px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.keyboard-hint {
    text-align: center;
    color: #999;
    font-size: 0.85em;
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    color: #999;
    font-size: 0.9em;
    border-top: 1px solid #e0e0e0;
}

.footer strong {
    color: #667eea;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

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

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

    .card-content {
        font-size: 1em;
    }

    .nav-btn {
        padding: 12px 20px;
        font-size: 0.9em;
    }
}
