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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

h1 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.score {
    font-size: 1.25rem;
    color: #475569;
    font-weight: 600;
}

#correct {
    color: #2563eb;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.noun-display {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.word-text {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.article-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.translation-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.article-btn {
    font-size: 1.75rem;
    font-weight: 700;
    padding: 2rem 0;
    border: none;
    border-radius: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
}

.article-btn:active {
    transform: scale(0.95);
}

.article-btn:disabled {
    cursor: not-allowed;
}

.article-btn:disabled:active {
    transform: scale(1);
}

.btn-der {
    background: #3b82f6;
}

.btn-der:hover:not(:disabled) {
    background: #2563eb;
}

.btn-die {
    background: #ec4899;
}

.btn-die:hover:not(:disabled) {
    background: #db2777;
}

.btn-das {
    background: #10b981;
}

.btn-das:hover:not(:disabled) {
    background: #059669;
}

.btn-der.correct,
.btn-die.correct,
.btn-das.correct {
    outline: 5px solid #000;
    outline-offset: -5px;
}

.btn-der.dimmed {
    background: #93c5fd;
    opacity: 0.6;
}

.btn-die.dimmed {
    background: #f9a8d4;
    opacity: 0.6;
}

.btn-das.dimmed {
    background: #6ee7b7;
    opacity: 0.6;
}

.translation-btn {
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1.5rem 1rem;
    border: none;
    border-radius: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    word-break: break-word;
}

.translation-btn:active {
    transform: scale(0.95);
}

.translation-btn:disabled {
    cursor: not-allowed;
}

.translation-btn:disabled:active {
    transform: scale(1);
}

.translation-btn:nth-child(1) {
    background: #3b82f6;
}

.translation-btn:nth-child(1):hover:not(:disabled) {
    background: #2563eb;
}

.translation-btn:nth-child(2) {
    background: #ec4899;
}

.translation-btn:nth-child(2):hover:not(:disabled) {
    background: #db2777;
}

.translation-btn:nth-child(3) {
    background: #10b981;
}

.translation-btn:nth-child(3):hover:not(:disabled) {
    background: #059669;
}

.translation-btn:nth-child(4) {
    background: #f97316;
}

.translation-btn:nth-child(4):hover:not(:disabled) {
    background: #ea580c;
}

.translation-btn.correct {
    outline: 5px solid #000;
    outline-offset: -5px;
}

.translation-btn.dimmed {
    opacity: 0.6;
}

.translation-btn:nth-child(1).dimmed {
    background: #93c5fd;
}

.translation-btn:nth-child(2).dimmed {
    background: #f9a8d4;
}

.translation-btn:nth-child(3).dimmed {
    background: #6ee7b7;
}

.translation-btn:nth-child(4).dimmed {
    background: #fed7aa;
}

.feedback {
    border: 4px solid;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

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

.feedback.correct {
    background: #dcfce7;
    border-color: #22c55e;
}

.feedback.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
}


.feedback-text {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feedback.correct .feedback-text {
    color: #15803d;
}

.feedback.incorrect .feedback-text {
    color: #b91c1c;
}

.feedback-phrase {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.feedback-translation {
    font-size: 1.125rem;
    color: #475569;
}

.next-btn {
    background: #334155;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1.25rem;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
}

.next-btn:hover {
    background: #1e293b;
}

.next-btn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

/* Mobile optimization */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .noun-text {
        font-size: 2.5rem;
    }
    
    .article-btn {
        font-size: 1.5rem;
        padding: 1.5rem 0;
    }
    
    .choice-btn {
        font-size: 1rem;
        padding: 1.25rem 0.75rem;
    }
    
    .feedback-text {
        font-size: 1.5rem;
    }
    
    .feedback-phrase {
        font-size: 1.25rem;
    }
}