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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%;
    min-height: 600px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.language-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.language-selector label {
    font-weight: bold;
    color: #666;
}

.language-selector select {
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background: white;
}

.game-area {
    text-align: center;
}

.score-area {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: bold;
    color: #333;
}

.timer-container {
    position: relative;
}

#timer {
    color: #28a745;
    font-weight: bold;
}

#timer.warning {
    color: #ffc107;
}

#timer.danger {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.image-container {
    margin-bottom: 30px;
}

.image-container img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.sentence-container {
    margin-bottom: 30px;
}

.sentence-container p {
    font-size: 1.4em;
    line-height: 1.6;
    color: #333;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

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

#answer-input {
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    min-width: 200px;
    text-align: center;
}

#answer-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

button {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#check-button {
    background: #28a745;
    color: white;
}

#check-button:hover {
    background: #218838;
    transform: translateY(-2px);
}

#next-button {
    background: #007bff;
    color: white;
}

#next-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

#restart-button {
    background: #6c757d;
    color: white;
}

#restart-button:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.feedback {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1b2b7;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        width: 95%;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .score-area {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .input-container {
        flex-direction: column;
        align-items: center;
    }
    
    #answer-input {
        min-width: 250px;
    }
}

/* Placeholder image styling */
.placeholder-image {
    width: 300px;
    height: 200px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    margin: 0 auto;
}