:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --accent: #ffd700;
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --text-light: #f8f9fa;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(106, 17, 203, 0.1), transparent 70%);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.5; }
    to { transform: scale(1.5); opacity: 0.8; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

header {
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    text-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Interactive Section */
.game-section {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow);
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

input[type="text"] {
    width: 100%;
    max-width: 500px;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    border: 2px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

input[type="text"]:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(37, 117, 252, 0.3);
}

/* Magic 8 Ball */
.bola-outer {
    perspective: 1000px;
    margin: 2rem auto;
    cursor: pointer;
}

.bola {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 30% 30%, #444, #000);
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    box-shadow: inset -20px -20px 50px rgba(0,0,0,0.8),
                20px 20px 40px rgba(0,0,0,0.5);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bola:hover {
    transform: scale(1.05);
}

.bola.shaking {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.cara-8 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.5rem;
    font-weight: 900;
    color: black;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
    z-index: 5;
}

.cara-respuesta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, #2a2a8a, #000);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    border: 12px solid #111;
    box-shadow: inset 0 0 30px rgba(0,0,0,1), 0 0 20px rgba(37, 117, 252, 0.2);
    transition: opacity 0.8s ease;
    z-index: 10;
}

.triangulo {
    width: 0;
    height: 0;
    border-left: 65px solid transparent;
    border-right: 65px solid transparent;
    border-bottom: 110px solid #1e3a8a;
    position: absolute;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

#respuesta {
    position: relative;
    z-index: 2;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    max-width: 90px;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    animation: float 2s infinite ease-in-out;
}

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

#reiniciar {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#reiniciar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#reiniciar:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(106, 17, 203, 0.5);
}

/* Content Sections */
.content-section {
    text-align: center;
    margin-bottom: 4rem;
    background: var(--glass);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.content-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.content-section p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem auto 0;
    max-width: 600px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.feature-card span {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* FAQ Accordion - Keep Left Aligned */
.faq-container {
    margin-top: 2rem;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-bottom: 0;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 1rem;
}

footer {
    margin-top: 4rem;
    padding: 3rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid var(--glass-border);
}

.footer-links {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
    .game-section { padding: 1.5rem; }
    .bola { width: 200px; height: 200px; }
    .cara-8 { width: 90px; height: 90px; font-size: 4rem; }
}
