/* diminumero - Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F8DDA4;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.lang-flag {
    font-size: 2rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.6;
    filter: grayscale(50%);
}

.lang-flag:hover {
    transform: scale(1.15);
    opacity: 1;
    filter: grayscale(0%);
}

.lang-flag.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

/* Landing Page */
.landing-page {
    text-align: center;
}

.hero {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #813405;
    font-weight: bold;
}

.subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 15px;
}

.description {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Mode Selection */
.mode-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px 0;
}

.mode-card {
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.mode-card:not(.mode-disabled):hover {
    background: #F8DDA4;
    border-color: #813405;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(129, 52, 5, 0.3);
}

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

.mode-title {
    font-size: 1.5rem;
    color: #813405;
    margin-bottom: 15px;
    font-weight: bold;
}

.mode-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    min-height: 48px;
}

.mode-card form {
    margin: 0;
}

.mode-card .btn {
    width: 100%;
}

.btn-disabled {
    background: #d0d0d0;
    color: #888;
    cursor: not-allowed;
    border: 3px solid #b0b0b0;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

.info {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

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

.info-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #813405;
}

.info-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: #F8DDA4;
    color: #813405;
    border: 3px solid #813405;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(129, 52, 5, 0.3);
    background: #f5d28a;
}

.btn-large {
    padding: 18px 50px;
    font-size: 1.3rem;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-exit {
    background: #ff6b6b;
    color: white;
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-exit:hover {
    background: #ff5252;
}

/* Quiz Page */
.quiz-page {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.progress-info {
    font-size: 1rem;
    color: #888;
    font-weight: 600;
}

.score-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #813405;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 40px;
}

.progress-fill {
    height: 100%;
    background: #F8DDA4;
    transition: width 0.5s ease;
}

/* Question */
.question-container {
    text-align: center;
    margin-bottom: 40px;
}

.question-label {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 500;
}

.number-display {
    font-size: 5rem;
    font-weight: bold;
    color: #813405;
    margin: 30px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Options Grid */
.options-form {
    margin-top: 30px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.option-btn {
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: #F8DDA4;
    color: #813405;
    border-color: #813405;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(129, 52, 5, 0.3);
}

.option-btn:active {
    transform: translateY(-1px);
}

/* Advanced Mode - Text Input */
.answer-form {
    margin-top: 30px;
}

.text-input-container {
    margin-bottom: 30px;
}

.answer-input {
    width: 100%;
    font-size: 1.5rem;
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    background: #f8f9fa;
    color: #333;
    font-family: inherit;
    transition: all 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #813405;
    background: white;
    box-shadow: 0 4px 15px rgba(129, 52, 5, 0.2);
}

.answer-input::placeholder {
    color: #aaa;
}

/* Validation Feedback */
.validation-feedback {
    margin-top: 15px;
    min-height: 40px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.validation-feedback:empty {
    padding: 0;
    min-height: 0;
}

.validation-feedback span {
    padding: 5px 8px;
    margin: 0 3px;
    border-radius: 5px;
    display: inline-block;
    transition: all 0.2s ease;
}

/* Word validation states */
.word-correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.word-incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.word-incomplete {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

/* Overall feedback states */
.feedback-complete {
    background: #d4edda;
    border: 2px solid #28a745;
}

.feedback-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.feedback-progress {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

/* Button group for advanced mode */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.button-group .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Results Page */
.results-page {
    text-align: center;
}

.results-container {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.results-title {
    font-size: 2.5rem;
    color: #813405;
    margin-bottom: 40px;
}

.score-card {
    background: #F8DDA4;
    color: #813405;
    border: 3px solid #813405;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.final-score {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.score-divider {
    margin: 0 10px;
    opacity: 0.7;
}

.score-label {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.percentage {
    font-size: 3rem;
    font-weight: bold;
}

.performance-message {
    margin: 30px 0;
}

.performance-message p {
    font-size: 1.3rem;
    padding: 20px;
    border-radius: 10px;
    font-weight: 500;
}

.message-perfect {
    background: #d4edda;
    color: #155724;
}

.message-great {
    background: #d1ecf1;
    color: #0c5460;
}

.message-good {
    background: #fff3cd;
    color: #856404;
}

.message-practice {
    background: #f8d7da;
    color: #721c24;
}

.results-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease, slideOut 0.5s ease 2.5s;
    z-index: 1000;
}

.toast-success {
    background: #4caf50;
    color: white;
}

.toast-error {
    background: #ff6b6b;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Feedback Section */
.feedback-section {
    margin-top: 40px;
    text-align: center;
}

.btn-feedback {
    background: #F9A03F;
    color: #813405;
    border: 2px solid #813405;
    padding: 12px 30px;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-feedback:hover {
    background: #D45113;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 81, 19, 0.3);
}

/* Footer */
.page-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.footer-link {
    color: #813405;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #D45113;
    text-decoration: underline;
}

/* Imprint Page */
.imprint-page {
    text-align: left;
}

.imprint-container {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
}

.imprint-title {
    font-size: 2.5rem;
    color: #813405;
    margin-bottom: 40px;
    text-align: center;
}

.imprint-section {
    margin-bottom: 30px;
}

.imprint-section h2 {
    font-size: 1.5rem;
    color: #813405;
    margin-bottom: 15px;
    border-bottom: 2px solid #F8DDA4;
    padding-bottom: 10px;
}

.imprint-section h3 {
    font-size: 1.2rem;
    color: #D45113;
    margin-top: 20px;
    margin-bottom: 10px;
}

.imprint-section p {
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

.imprint-section a {
    color: #D45113;
    text-decoration: none;
    font-weight: 600;
}

.imprint-section a:hover {
    text-decoration: underline;
}

.imprint-actions {
    margin-top: 40px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .mode-selection {
        grid-template-columns: 1fr;
    }
    
    .number-display {
        font-size: 3.5rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .info {
        gap: 30px;
    }
    
    .hero, .results-container, .quiz-page {
        padding: 40px 25px;
    }
    
    .imprint-container {
        padding: 40px 25px;
    }
    
    .quiz-header {
        font-size: 0.9rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        font-size: 1rem;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .lang-flag {
        font-size: 1.5rem;
    }
    
    .answer-input {
        font-size: 1.2rem;
        padding: 15px;
    }
    
    .validation-feedback {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .btn-large {
        padding: 15px 35px;
        font-size: 1.1rem;
    }
    
    .number-display {
        font-size: 2.5rem;
    }
    
    .option-btn {
        padding: 20px 15px;
        font-size: 1.1rem;
    }
}
