/* ==========================================================================
   ORÁCULO DE LAS FLORES & I CHING - SISTEMA DE DISEÑO Y ESTILOS
   ========================================================================== */

/* 1. CONFIGURACIÓN DE VARIABLES Y TEMAS (HSL) */
:root {
    --bg-dark: hsl(260, 45%, 5%);
    --bg-card: rgba(25, 12, 45, 0.45);
    --bg-sidebar: rgba(18, 8, 32, 0.96);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(212, 175, 55, 0.35);
    
    /* Colores Místicos */
    --color-primary: hsl(175, 80%, 40%);     /* Verde Menta / Turquesa Místico */
    --color-secondary: hsl(280, 70%, 65%);   /* Lavanda Mística */
    --color-gold: hsl(45, 85%, 50%);         /* Oro de Bronce */
    --color-gold-hover: hsl(45, 100%, 60%);
    --color-red: hsl(350, 75%, 55%);
    --color-green: hsl(140, 65%, 45%);
    --color-text: hsl(240, 10%, 90%);
    --color-text-muted: hsl(240, 10%, 65%);
    
    /* Fuentes */
    --font-serif: 'Marcellus', serif;
    --font-sans: 'Outfit', sans-serif;
    
    /* Sombras y Resplandores */
    --glow-primary: 0 0 20px rgba(44, 203, 185, 0.45);
    --glow-secondary: 0 0 20px rgba(189, 102, 230, 0.45);
    --glow-gold: 0 0 25px rgba(212, 175, 55, 0.35);
    --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* 2. REINICIOS Y ESTILOS GENERALES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Lienzo de Pétalos */
#floral-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Contenedor de la aplicación */
.app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. ENCABEZADO DE LA APLICACIÓN */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-area {
    display: flex;
    flex-direction: column;
}

.logo-area h1 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: normal;
    letter-spacing: 1px;
    color: var(--color-text);
    background: linear-gradient(135deg, #fff 30%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 5px;
    filter: drop-shadow(var(--glow-primary));
}

.subtitle {
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Selector de Idioma en Encabezado */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 3px;
    border-radius: 20px;
    gap: 2px;
    backdrop-filter: blur(5px);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: var(--color-text);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #0b0515;
    box-shadow: 0 2px 8px rgba(44, 203, 185, 0.25);
}


/* 4. BOTONES E INTERACTIVOS */
.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--color-text);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: rotate(30deg);
    box-shadow: var(--glow-secondary);
}

.btn {
    font-family: var(--font-sans);
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #0b0515;
    box-shadow: 0 4px 15px rgba(44, 203, 185, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    opacity: 0;
}

.btn-glow:hover::after {
    left: 120%;
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-text-muted);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 15px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    width: 100%;
    justify-content: space-between;
}

.btn-group .btn {
    flex: 1;
}

/* 5. DISEÑO DE CARTAS DE VIDRIO (GLASSMORPHISM) */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

.card {
    padding: 40px;
    text-align: center;
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.glow-icon {
    font-size: 1.8rem;
    color: var(--color-gold);
    filter: drop-shadow(var(--glow-gold));
    animation: pulse 2.5s infinite alternate;
}

.card h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: normal;
    color: #fff;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    max-width: 420px;
}

/* Indicador de pasos */
.step-indicator {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

/* 6. CONTROLADOR DE PASOS / NAVEGACIÓN */
.ritual-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.ritual-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    width: 100%;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ritual-step.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* 7. FORMULARIOS E INPUTS */
.form-group {
    width: 100%;
    margin-bottom: 22px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input {
    padding: 14px 14px 14px 45px;
}

.input-wrapper textarea {
    padding: 14px 14px 14px 45px;
    resize: none;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-icon.align-top {
    top: 25px;
    transform: none;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(44, 203, 185, 0.15);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper textarea:focus + .input-icon {
    color: var(--color-primary);
}

/* Fechas compuestas */
.date-inputs {
    display: flex;
    gap: 10px;
}

.date-col {
    flex: 1;
}

.date-col input {
    text-align: center;
    padding-left: 0;
}

.form-tip {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Selector de Roles */
.role-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-bottom: 30px;
}

.role-option {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option i {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-right: 18px;
    transition: all 0.3s ease;
}

.role-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.role-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.role-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.role-option.active {
    background: rgba(189, 102, 230, 0.08);
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(189, 102, 230, 0.15);
}

.role-option.active i {
    color: var(--color-secondary);
    filter: drop-shadow(var(--glow-secondary));
}

/* Selector de Género */
.gender-selector {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.gender-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.gender-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.gender-option.active {
    background: rgba(44, 203, 185, 0.08);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 12px rgba(44, 203, 185, 0.15);
}

.gender-option.active i {
    color: var(--color-primary);
    filter: drop-shadow(var(--glow-primary));
}

.gender-option.highlight-pulse {
    animation: borderPulse 1.5s infinite alternate;
}

@keyframes borderPulse {
    0% {
        border-color: var(--border-glass);
        box-shadow: none;
    }
    100% {
        border-color: var(--color-secondary);
        box-shadow: 0 0 8px rgba(189, 102, 230, 0.3);
    }
}

/* Mensaje de Error */
.error-msg {
    width: 100%;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: var(--color-red);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    text-align: left;
}

/* 8. DETALLE ZODIACAL Y CARD DE RESPUESTA */
.zodiac-flower-card {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 18px;
    border: 1px solid var(--border-gold);
    overflow: hidden;
    margin-bottom: 25px;
    text-align: left;
    box-shadow: var(--shadow-card);
}

.zodiac-header {
    display: flex;
    justify-content: space-between;
    background: rgba(212, 175, 55, 0.1);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-gold);
}

.zodiac-header-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zodiac-header-col.text-right {
    align-items: flex-end;
    text-align: right;
}

.zodiac-badge {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.flower-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.zodiac-body {
    padding: 20px;
}

.symbol-age {
    font-size: 0.85rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.symbol-age .label {
    color: var(--color-text-muted);
}

.symbol-age .value {
    font-weight: 600;
    color: #fff;
}

.characteristic-block {
    margin-bottom: 15px;
}

.characteristic-block:last-child {
    margin-bottom: 0;
}

.characteristic-block h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.characteristic-block p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.icon-teal { color: var(--color-primary); }
.icon-purple { color: var(--color-secondary); }
.icon-gold { color: var(--color-gold); }


/* ==============================================
   9. RITUAL I CHING (MONEDAS Y TABLERO)
   ============================================== */
.card-iching {
    max-width: 650px;
}

.iching-ritual-area {
    display: flex;
    gap: 30px;
    width: 100%;
    margin-bottom: 25px;
    align-items: stretch;
}

/* El Tablero del Hexagrama */
.iching-board {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
}

.board-header {
    font-size: 0.75rem;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.board-lines {
    flex: 1;
    display: flex;
    flex-direction: column-reverse; /* Las líneas se añaden de abajo hacia arriba */
    justify-content: space-around;
    gap: 15px;
    min-height: 200px;
}

/* Placeholder de línea */
.iching-line-placeholder {
    height: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Línea Dibujada Real */
.iching-line-real {
    height: 12px;
    width: 100%;
    animation: drawLine 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Estilos de líneas I Ching */
.yang-stable-line {
    background: linear-gradient(90deg, var(--color-primary), hsl(175, 80%, 50%));
    border-radius: 6px;
    box-shadow: var(--glow-primary);
}

.yin-stable-line {
    display: flex;
    justify-content: space-between;
}

.yin-stable-line::before,
.yin-stable-line::after {
    content: '';
    width: 44%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), hsl(280, 70%, 75%));
    border-radius: 6px;
    box-shadow: var(--glow-secondary);
}

.yang-mutating-line {
    position: relative;
    background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.yang-mutating-line::after {
    content: '◯';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--color-gold);
    font-weight: bold;
    text-shadow: var(--glow-gold);
}

.yin-mutating-line {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.yin-mutating-line::before,
.yin-mutating-line::after {
    content: '';
    width: 44%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-gold));
    border-radius: 6px;
}

.yin-mutating-line-x {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -55%);
    font-size: 0.95rem;
    color: var(--color-gold);
    font-weight: 800;
    text-shadow: var(--glow-gold);
}

/* Panel de control de lanzamiento */
.coins-control-panel {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
}

.coins-viewport {
    display: flex;
    justify-content: center;
    gap: 15px;
    height: 100px;
    align-items: center;
    margin-bottom: 15px;
}

/* Moneda 3D */
.iching-coin {
    width: 64px;
    height: 64px;
    perspective: 500px;
}

.coin-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.2, 0.85, 0.3, 1.05);
}

.coin-3d .face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Efecto hueco cuadrado de moneda china */
.coin-3d .face::after {
    content: '';
    position: absolute;
    width: 25%;
    height: 25%;
    background: #190c29; /* Color oscuro que combina con el fondo de la carta */
    border: 1.5px solid var(--color-gold);
    border-radius: 2px;
}

.coin-3d .face.front {
    background: radial-gradient(circle, hsl(45, 60%, 35%) 0%, hsl(45, 80%, 15%) 100%);
    transform: rotateY(0deg);
}

.coin-3d .face.back {
    background: radial-gradient(circle, hsl(45, 45%, 30%) 0%, hsl(45, 65%, 12%) 100%);
    transform: rotateY(180deg);
}

.coin-symbol {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-gold);
    margin-top: -12px;
}

.face-label {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    position: absolute;
    bottom: 8px;
}

.roll-status {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 20px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animaciones al girar monedas */
.spinning-fast {
    animation: coinSpinFast 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.2) forwards;
}

@keyframes coinSpinFast {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    50% { transform: rotateY(900deg) rotateX(180deg); }
    100% { transform: rotateY(1800deg) rotateX(360deg); }
}

@keyframes drawLine {
    0% {
        opacity: 0;
        transform: scaleX(0.2);
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}


/* ==============================================
   10. CARD DE RESPUESTA REVELACIÓN 3D
   ============================================== */
.card-revelation {
    max-width: 650px;
}

.mystic-card-wrapper {
    perspective: 1500px;
    width: 100%;
    max-width: 500px;
    height: 490px;
    margin: 20px auto 30px;
}

.mystic-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.mystic-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Frontal (Templo / Mandala) */
.card-face.front {
    background: linear-gradient(135deg, hsl(265, 50%, 10%) 0%, hsl(280, 50%, 4%) 100%);
    border: 2px solid var(--border-gold);
}

.card-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mandala {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px dashed var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: rotateSlow 30s linear infinite;
}

.mandala i {
    font-size: 3.5rem;
    color: var(--color-gold);
    position: absolute;
    filter: drop-shadow(var(--glow-gold));
}

.mandala .inner-flower {
    font-size: 1.8rem;
    color: var(--color-primary);
    animation: rotateCounter 15s linear infinite;
}

.tap-hint {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold);
    animation: pulse 1.5s infinite alternate;
}

/* Posterior (Respuesta completa) */
.card-face.back {
    background: linear-gradient(135deg, hsl(265, 40%, 8%) 0%, hsl(280, 40%, 3%) 100%);
    border: 2px solid var(--border-gold);
    transform: rotateY(180deg);
    text-align: left;
    display: block;
    overflow-y: auto;
}

.card-response-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.header-symbol {
    font-size: 1.4rem;
    color: var(--color-secondary);
}

.card-response-header h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #fff;
    font-weight: normal;
}

.btn-speak {
    margin-left: auto;
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
}

.btn-speak.speaking {
    animation: speakPulse 1.5s infinite alternate;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

@keyframes speakPulse {
    0% {
        box-shadow: 0 0 5px rgba(44, 203, 185, 0.3);
    }
    100% {
        box-shadow: 0 0 15px rgba(44, 203, 185, 0.7);
    }
}

/* Contenedor de Hexagramas en Resultados */
.hexagrams-container-result {
    display: flex;
    gap: 25px;
    margin: 10px 0 20px;
    justify-content: center;
}

.result-hexagram-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hex-visual-box {
    width: 60px;
    height: 46px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    margin-bottom: 10px;
}

.hex-visual-box .visual-line-yang {
    height: 4px;
    width: 100%;
    background: var(--color-primary);
    border-radius: 2px;
}

.hex-visual-box .visual-line-yin {
    display: flex;
    justify-content: space-between;
    height: 4px;
    width: 100%;
}

.hex-visual-box .visual-line-yin::before,
.hex-visual-box .visual-line-yin::after {
    content: '';
    width: 44%;
    height: 100%;
    background: var(--color-secondary);
    border-radius: 2px;
}

.hex-title {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.hex-desc-label {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--color-gold);
    margin: 3px 0 6px;
    font-weight: bold;
}

.hex-summary-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.question-quote {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    border-left: 2px solid rgba(255,255,255,0.1);
    padding-left: 10px;
}

.oracle-text {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 15px;
    line-height: 1.6;
}

.mystic-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
    margin: 15px 0;
}

.oracle-advice {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 15px;
    border-left: 3px solid var(--color-primary);
}

.oracle-advice i {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-top: 3px;
}

.oracle-advice p {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-text);
}


/* ==============================================
   11. REPORTE ADMINISTRATIVO (IN-LINE)
   ============================================== */
.report-box {
    width: 100%;
    margin-top: 25px;
    padding: 20px;
    border-radius: 16px;
    text-align: left;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.report-box pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    margin-bottom: 12px;
}

.report-box pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #4cd9c0;
}

.report-instruction {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-alert {
    display: flex;
    gap: 15px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 15px;
}

.report-alert .alert-icon {
    font-size: 1.6rem;
    color: var(--color-gold);
}

.report-alert h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--color-gold);
}

.report-alert p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.encrypted-symbols {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    padding: 18px;
    border-radius: 10px;
    font-size: 1.1rem;
    letter-spacing: 3px;
    line-height: 1.8;
    word-break: break-all;
    user-select: none;
    margin-bottom: 12px;
    color: var(--color-secondary);
    filter: drop-shadow(0 0 5px rgba(189, 102, 230, 0.2));
}


/* ==============================================
   12. PANEL DE ADMINISTRACIÓN LATERAL (SIDEBAR)
   ============================================== */
.sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    z-index: 1010;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: var(--bg-sidebar);
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: normal;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.admin-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* Badge de estado del Admin */
.admin-status-badge {
    background: rgba(76, 217, 100, 0.08);
    border: 1px solid rgba(76, 217, 100, 0.25);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-green { color: var(--color-green); }

.control-group {
    margin-bottom: 25px;
    text-align: left;
}

.control-group h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gold);
}

.control-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 15px;
}

/* Ajustes de configuración por radio */
.radio-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-setting-option {
    display: flex;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-setting-option input[type="radio"] {
    margin-top: 4px;
    margin-right: 12px;
    accent-color: var(--color-primary);
}

.radio-label {
    display: flex;
    flex-direction: column;
}

.radio-label strong {
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 2px;
}

.radio-label span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.radio-setting-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radio-setting-option:has(input:checked) {
    background: rgba(44, 203, 185, 0.06);
    border-color: var(--color-primary);
}

/* Historial y Lista de Reportes */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0,0,0,0.25);
    padding: 10px;
    border-radius: 12px;
}

.no-reports {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}

.report-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.report-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.report-item-info {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.report-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-item-meta {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.report-item-actions {
    display: flex;
    gap: 6px;
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-icon-sm:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-icon-sm.delete-btn:hover {
    color: var(--color-red);
    border-color: rgba(244, 67, 54, 0.4);
    background: rgba(244, 67, 54, 0.1);
}

/* Capa superpuesta para cerrar Sidebar */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}


/* ==============================================
   13. PIE DE PÁGINA Y ANIMACIONES CLAVE
   ============================================== */
.app-footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: auto;
}

.app-footer strong {
    color: var(--color-secondary);
}

.seo-text {
    font-size: 0.7rem;
    margin-top: 6px;
    opacity: 0.6;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCounter {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}


/* ==============================================
   14. MEDIAS QUERIES - DISEÑO RESPONSIVO
   ============================================== */
@media (max-width: 600px) {
    .app-header {
        padding: 15px 0;
    }
    
    .logo-area h1 {
        font-size: 1.4rem;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .iching-ritual-area {
        flex-direction: column;
        gap: 20px;
    }
    
    .mystic-card-wrapper {
        height: 600px;
    }
    
    .hexagrams-container-result {
        flex-direction: column;
        gap: 15px;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .sidebar {
        width: 100%;
        right: -100%;
    }
}

/* ==============================================
   15. ESTILOS DE EVALUACIÓN DE RIESGO PSICOLÓGICO
   ============================================== */
.report-item {
    display: flex;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
}

.report-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.report-item-question {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 6px;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-risk {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 6px;
}

.badge-high {
    background: rgba(244, 67, 54, 0.15);
    color: #ff5252;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.badge-medium {
    background: rgba(255, 152, 0, 0.15);
    color: #ffd54f;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.report-item-risk-detail {
    font-size: 0.75rem;
    padding: 10px;
    border-radius: 6px;
    margin-top: 4px;
    line-height: 1.4;
    text-align: left;
}

.report-item-risk-detail strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.report-item-risk-detail p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.report-item-risk-detail.risk-high {
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-left: 3px solid #ff5252;
}

.report-item-risk-detail.risk-high strong {
    color: #ff5252;
}

.report-item-risk-detail.risk-medium {
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-left: 3px solid #ffd54f;
}

.report-item-risk-detail.risk-medium strong {
    color: #ffd54f;
}
