:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --bg: #f9f9f9;
    --text: #2d3436;
    --card-bg: #ffffff;
    --success: #00b894;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.quiz-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 90vw;
    max-width: 600px;
    text-align: center;
}

header h1 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 2.5rem;
}

header p {
    color: #636e72;
    margin-bottom: 30px;
}

.intro-image {
    font-size: 5rem;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.pop-emoji {
    display: inline-block;
    opacity: 0;
    transform: scale(0) rotate(-20deg);
    animation: emojiPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.pop-emoji:nth-child(1) { animation-delay: 0.2s; }
.pop-emoji:nth-child(2) { animation-delay: 0.4s; }
.pop-emoji:nth-child(3) { animation-delay: 0.6s; }
.pop-emoji:nth-child(4) { animation-delay: 0.8s; }

@keyframes emojiPop {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn:hover {
    transform: scale(1.05);
    background: #5b4cc4;
}

.hidden {
    display: none !important;
}

/* Quiz UI */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin-bottom: 30px;
    overflow: hidden;
}

#progress {
    height: 100%;
    background: var(--success);
    transition: width 0.4s ease;
}

#question-text {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.option-btn {
    padding: 15px 20px;
    background: #f1f2f6;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    text-align: left;
}

.option-btn:hover {
    background: #dfe4ea;
    border-color: var(--secondary);
}

.option-btn:active {
    transform: scale(0.98);
}

/* Result UI */
#animal-emoji {
    font-size: 6rem;
    margin: 20px 0;
}

#animal-name {
    color: var(--primary);
    font-size: 3rem;
    margin: 10px 0;
}

#animal-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #444;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.secondary-btn {
    background: var(--success);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.secondary-btn:hover {
    background: #00a383;
}

/* Interaction Screen */
#interaction-screen {
    padding: 20px;
}

#interactive-animal-container {
    position: relative;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

#alive-animal-emoji {
    font-size: 8rem;
    transition: all 0.5s ease;
    cursor: pointer;
}

#speech-bubble {
    position: absolute;
    top: -20px;
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-weight: bold;
    color: var(--primary);
    animation: popIn 0.3s ease-out;
}

#speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

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

.interaction-btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    background: #f1f2f6;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.interaction-btn:hover {
    background: #dfe4ea;
    transform: translateY(-2px);
}

/* Animations */
.floating {
    animation: float 3s ease-in-out infinite;
}

.jumping {
    animation: jump 0.5s ease-out;
}

.head-sway {
    animation: sway 1s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-50px) rotate(10deg); }
    100% { transform: translateY(0); }
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

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

footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #b2bec3;
}
