:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2C3E50;
    --light: #F7FFF7;
    --success: #6BCB77;
    --danger: #FF6B6B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 50%, #ffffff 0%, #e0f7fa 100%);
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    max-height: 800px;
    position: relative;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 600px) {
    .app-container {
        height: 90vh;
    }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    visibility: visible;
    opacity: 1;
    z-index: 10;
}

.card {
    text-align: center;
    margin: auto;
    padding: 40px 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    border: 4px solid var(--accent);
}

h1, h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.input-group {
    margin: 20px 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--secondary);
}

.btn {
    padding: 12px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.primary-btn {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

.primary-btn:hover {
    background-color: #ff5252;
}

.secondary-btn {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.4);
}

/* Game Screen Styles */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.score-display {
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-box {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    border: 4px solid var(--secondary);
    background: var(--light);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.choices {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.choice-btn {
    flex: 1;
    min-width: 100px;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: var(--primary);
    color: white;
}

.choice-btn.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
    animation: correct-pulse 0.5s;
}

.choice-btn.wrong {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: shake 0.5s;
}

.feedback-card {
    margin-top: 20px;
    padding: 15px;
    background: var(--light);
    border: 2px dashed var(--secondary);
    border-radius: 15px;
    text-align: center;
    width: 100%;
}

.hidden {
    display: none !important;
}

.desc-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 15px;
}

/* Animations */
.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes correct-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}
