:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #f5f5f5;
}

body {
    margin: 0; font-family: 'Poppins', sans-serif; color: white;
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
}

.bg-animated {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#app-container {
    width: 95%; max-width: 850px; background: var(--glass);
    backdrop-filter: blur(25px); border-radius: 30px; padding: 2rem;
    border: 1px solid var(--glass-border); box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--glass-border);
}

.user-badge { display: flex; align-items: center; gap: 15px; }
.avatar { 
    width: 50px; height: 50px; background: var(--primary); 
    border-radius: 50%; display: flex; justify-content: center; 
    align-items: center; font-size: 1.5rem; color: #000;
}

.timer-wrapper { display: flex; justify-content: center; align-items: center; }
.timer-circle {
    width: 70px; height: 70px; border: 4px solid var(--primary);
    border-radius: 50%; display: flex; flex-direction: column;
    justify-content: center; align-items: center; background: rgba(0,0,0,0.3);
    box-shadow: 0 0 15px var(--primary);
}

#timer-count { font-family: 'Orbitron'; font-weight: bold; font-size: 1.2rem; }
#timer-face { font-size: 1rem; }

.score-container {
    text-align: center; background: rgba(0,0,0,0.2);
    padding: 10px 20px; border-radius: 15px; font-family: 'Orbitron', sans-serif;
}

/* Menú y Selección de Dificultad */
.menu-card { text-align: center; }
.level-grid {
    display: flex; justify-content: center; gap: 15px; margin: 20px 0; flex-wrap: wrap;
}
.lvl-option {
    padding: 12px 25px; border: 2px solid var(--primary); border-radius: 12px;
    background: rgba(255, 255, 255, 0.05); color: var(--text-light);
    cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px;
}
.lvl-option:hover { background: rgba(0, 210, 255, 0.2); transform: translateY(-2px); }
.lvl-option.active {
    background: var(--primary); color: #000; font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.6); border-color: #fff;
}

input[type="text"] {
    width: 80%; padding: 15px; border-radius: 12px; border: 1px solid var(--glass-border);
    margin: 10px 0; font-size: 1rem; background: rgba(255,255,255,0.1); color: white; outline: none;
}
input[type="text"]::placeholder { color: rgba(255,255,255,0.6); }

/* Botones y Alternativas */
.button-group { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }

.main-btn {
    background: var(--primary); color: #000; border: none; padding: 15px 40px;
    border-radius: 50px; font-size: 1.1rem; cursor: pointer; font-weight: bold;
    text-transform: uppercase; transition: 0.3s;
}
.main-btn:hover { box-shadow: 0 0 20px rgba(0, 210, 255, 0.6); transform: scale(1.02); }

.secondary-btn {
    background: transparent; color: white; border: 2px solid var(--primary); padding: 15px 30px;
    border-radius: 50px; font-size: 1.1rem; cursor: pointer; font-weight: bold; transition: 0.3s;
}
.secondary-btn:hover { background: rgba(0, 210, 255, 0.2); }

.option-btn {
    width: 100%; padding: 15px; margin: 10px 0; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05); color: white; border-radius: 12px;
    cursor: pointer; transition: 0.3s; font-size: 1rem; text-align: left;
}
.option-btn:hover { background: rgba(0, 210, 255, 0.2); border-color: var(--primary); transform: translateX(5px); }

/* Textarea Interactivo */
.textarea-container { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
.custom-textarea {
    width: 100%; height: 130px; background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border); border-radius: 12px; padding: 15px;
    color: white; font-family: 'Poppins', sans-serif; font-size: 1rem;
    resize: vertical; transition: all 0.3s ease; box-sizing: border-box;
}
.custom-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); background: rgba(255, 255, 255, 0.1); }
.custom-textarea::placeholder { color: rgba(255, 255, 255, 0.5); }

/* Sistema de Récords (Modal y Tabla) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
    background: rgba(15, 32, 39, 0.95); border: 1px solid var(--primary);
    border-radius: 20px; padding: 2rem; width: 90%; max-width: 600px;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.3);
}
.modal-content h2 { color: white; text-align: center; margin-top: 0; }
.table-container {
    max-height: 300px; overflow-y: auto; margin: 15px 0; border-radius: 10px;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
}
table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.9rem; }
th { background: rgba(0, 210, 255, 0.2); padding: 15px; font-weight: bold; color: var(--primary); position: sticky; top: 0; }
td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
tr:hover { background: rgba(255,255,255,0.05); }

/* Footer */
.corporate-footer { margin-top: 3rem; border-top: 1px solid var(--glass-border); padding-top: 1rem; opacity: 0.8; }
.footer-content { display: flex; justify-content: space-between; font-size: 0.85rem; }
.corp-info h4 { margin: 0 0 5px 0; color: var(--primary); }
.corp-info p { margin: 0; color: #ccc; line-height: 1.4; }
.contact-item { color: var(--primary); text-decoration: none; font-weight: bold; }
.social-icons { display: flex; gap: 10px; margin-top: 8px; font-size: 1.2rem; }
.hidden { display: none; }