:root {
    --primary: #a855f7;
    --secondary: #22d3ee;
    --bg: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --result-color: #a855f7;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: white;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
}

.glass-container {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Styles */
.badge {
    background: rgba(168, 85, 247, 0.2);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

h1 { 
    font-size: 1.75rem; 
    margin-bottom: 1rem; 
    line-height: 1.3;
    font-weight: 700;
}

.question-counter {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Options Container */
#options-container {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-weight: 500;
}

.option-btn {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

button:hover {
    background: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.4);
    border-color: var(--primary);
}

button:active {
    transform: scale(0.98);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--primary);
}

.hidden { 
    display: none !important; 
}

/* Result Screen Styles */
.result-emoji {
    font-size: 8rem;
    margin: 1rem 0;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0); 
    }
    50% { 
        transform: scale(1.15); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.result-header {
    margin-bottom: 1.5rem;
}

.result-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

#animal-name { 
    color: var(--result-color);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 0 20px var(--result-color);
}

.result-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 1.5rem;
    margin: 1.5rem 0;
    line-height: 1.7;
    border-left: 4px solid var(--result-color);
    font-size: 0.95rem;
    text-align: left;
    animation: fadeInUp 0.6s ease 0.3s both;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Share Section */
.share-section {
    margin: 2rem 0;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.share-title {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-share-social {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-share-social:hover {
    transform: translateY(-5px) scale(1.1);
}

.btn-share-social.twitter {
    background: rgba(29, 161, 242, 0.2);
    border-color: #1da1f2;
}

.btn-share-social.twitter:hover {
    background: #1da1f2;
    box-shadow: 0 10px 20px rgba(29, 161, 242, 0.4);
}

.btn-share-social.facebook {
    background: rgba(24, 119, 242, 0.2);
    border-color: #1877f2;
}

.btn-share-social.facebook:hover {
    background: #1877f2;
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.4);
}

.btn-share-social.whatsapp {
    background: rgba(37, 211, 102, 0.2);
    border-color: #25d366;
}

.btn-share-social.whatsapp:hover {
    background: #25d366;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
}

.btn-copy {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-copy:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.4);
}

/* Action Buttons */
.actions {
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease 0.7s both;
}

.btn-primary { 
    background: var(--primary);
    width: 100%;
    padding: 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    text-align: center;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(168, 85, 247, 0.4);
}

/* Credits */
.credits {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 1s ease 1s both;
}

.credits p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0.3rem 0;
}

.credits strong {
    color: var(--primary);
    font-weight: 700;
}

.credits .year {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 480px) {
    .glass-container {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .result-emoji {
        font-size: 6rem;
    }

    #animal-name {
        font-size: 1.75rem;
    }

    button {
        font-size: 0.9rem;
        padding: 0.9rem;
    }

    .btn-share-social {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 360px) {
    .glass-container {
        padding: 1.25rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    .result-emoji {
        font-size: 5rem;
    }

    .share-buttons {
        gap: 0.5rem;
    }
}

/* Landscape mode for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .glass-container {
        max-height: 95vh;
        overflow-y: auto;
        padding: 1rem;
    }

    .result-emoji {
        font-size: 4rem;
        margin: 0.5rem 0;
    }

    h1 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .result-card {
        padding: 1rem;
        margin: 1rem 0;
    }

    .share-section {
        margin: 1rem 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle at top right, #1e1b4b, #000000);
    }
}

.result-image {
    width: 100%;
    max-height: 320px;
    /* object-fit: cover; */
    border-radius: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: transform 0.4s ease;
}

.result-image:hover {
    transform: scale(1.03);
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}