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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

h1 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 28px;
}

.header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

select,
button {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

select {
    background: #f1f5f9;
    color: #1e293b;
    flex: 1;
    min-width: 180px;
}

button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

button.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.main {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.left-panel {
    flex: 1;
    min-width: 280px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.left-panel h3 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 18px;
}

.word-list {
    max-height: 500px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    padding: 8px;
}

.word-item {
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.15s;
    font-weight: 500;
    color: #475569;
}

.word-item:hover {
    background: #f1f5f9;
}

.word-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.right-panel {
    flex: 1.5;
    min-width: 320px;
}

.word-card {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s;
}

.word-card:hover {
    transform: scale(1.02);
}

.word-card:active {
    transform: scale(0.98);
}

.current-word {
    font-size: 48px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 16px;
    word-break: break-word;
}

.word-definition {
    font-size: 18px;
    color: #475569;
    line-height: 1.6;
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.progress {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

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

.progress-text {
    text-align: center;
    color: #64748b;
    font-weight: 500;
}

.settings {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.setting-row label {
    min-width: 80px;
    font-weight: 500;
    color: #475569;
}

.setting-row input[type="range"] {
    flex: 1;
}

.setting-row select {
    flex: 1;
}

.status {
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 500;
}

.status.success {
    background: #dcfce7;
    color: #15803d;
}

.status.error {
    background: #fee2e2;
    color: #b91c1c;
}

.status.loading {
    background: #fff3cd;
    color: #a16207;
}

.hidden {
    display: none;
}

.keyboard-hints {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    margin-top: 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
    color: #64748b;
}

kbd {
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
}

@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }

    .current-word {
        font-size: 36px;
    }
}
