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

body {
    font-family: 'Segoe UI', Arial, Helvetica, 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%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
}

header h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

main {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-right {
    background: #10b981;
    color: white;
    font-size: 18px;
    padding: 16px 32px;
}

.btn-right:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-wrong {
    background: #ef4444;
    color: white;
    font-size: 18px;
    padding: 16px 32px;
}

.btn-wrong:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.hidden {
    display: none !important;
}

.setup-screen {
    text-align: center;
    max-width: 600px;
}

.setup-screen h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 32px;
}

.setup-screen ol {
    text-align: left;
    line-height: 2;
    font-size: 18px;
}

.learning-screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.word-display {
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.russian-word {
    font-size: 56px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    padding: 20px 40px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.russian-word:hover {
    background: #f9fafb;
    transform: scale(1.05);
}

.greek-word {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-buttons {
    display: flex;
    gap: 20px;
}

.statistics {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.completion-screen {
    text-align: center;
}

.completion-screen h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #667eea;
}

.completion-screen p {
    font-size: 24px;
    margin-bottom: 30px;
    color: #6b7280;
}

.loading-screen {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f4f6;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingMessage {
    font-size: 18px;
    color: #6b7280;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-body label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.modal-body input[type="password"],
.modal-body input[type="text"],
.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
}

.modal-body textarea {
    resize: vertical;
    min-height: 300px;
}

.help-text {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

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

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

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.translations-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.translation-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.translation-row input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

.translation-row .greek-text {
    font-weight: 600;
    color: #333;
}

.flash-correct {
    animation: flashGreen 0.5s ease;
}

.flash-wrong {
    animation: flashRed 0.5s ease;
}

@keyframes flashGreen {
    0%, 100% { background: white; }
    50% { background: #d1fae5; }
}

@keyframes flashRed {
    0%, 100% { background: white; }
    50% { background: #fee2e2; }
}

@media (max-width: 768px) {
    .container {
        min-height: auto;
    }

    header h1 {
        font-size: 24px;
    }

    .header-buttons {
        flex-direction: column;
    }

    .russian-word {
        font-size: 40px;
    }

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

    .statistics {
        flex-direction: column;
        gap: 15px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-buttons .btn {
        width: 100%;
    }
}
