/* ================================================
   TIBETANO - APP STYLES
   Saffron / Crimson / Gold Theme
   ================================================ */

.tib-app {
    --tib-rojo-oscuro: #2d0a0a;
    --tib-carmesi: #8b0000;
    --tib-azafran: #ff8c00;
    --tib-dorado: #ffd700;
    --tib-oro-claro: #ffe44d;
    --tib-gradiente: linear-gradient(135deg, #2d0a0a 0%, #4a1515 50%, #6b1a1a 100%);
    --tib-gradiente-oro: linear-gradient(135deg, #cc6600 0%, #ff8c00 50%, #ffd700 100%);
    --tib-sombra: 0 10px 30px rgba(255, 140, 0, 0.15);
    --tib-radio: 16px;
    --tib-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

.tib-fase {
    animation: tibFadeIn 0.6s ease;
}

@keyframes tibFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================================
   FASE FORMULARIO
   ================================================ */

.tib-form-contenido {
    text-align: center;
    padding: 2.5rem 1rem;
}

.tib-icono-oraculo {
    font-size: 4rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: tibPulso 3s ease-in-out infinite;
}

@keyframes tibPulso {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 140, 0, 0.5)); }
}

.tib-destello {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
    animation: tibDestello 3s ease-in-out infinite;
    pointer-events: none;
}

.tib-destello::before { content: '\2726'; color: var(--tib-dorado); }
.tib-d2::before { content: '\2756'; color: var(--tib-azafran); }
.tib-d3::before { content: '\2727'; color: var(--tib-oro-claro); }

.tib-d1 { animation-delay: -0.5s; top: -10px; left: 10px; }
.tib-d2 { animation-delay: -1.5s; top: -5px; right: 15px; }
.tib-d3 { animation-delay: -2.5s; bottom: 5px; left: 25px; }

@keyframes tibDestello {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 0.8; transform: translateY(-20px) scale(1); }
}

.tib-titulo-form {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--tib-gradiente-oro);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tib-subtitulo-form {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.tib-form-campo {
    max-width: 500px;
    margin: 0 auto 1rem;
    text-align: left;
}

.tib-form-seccion {
    margin-bottom: 1.5rem;
}

.tib-seccion-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.tib-input,
.tib-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--tib-transicion);
    box-sizing: border-box;
}

.tib-textarea {
    min-height: 100px;
    resize: vertical;
}

.tib-input:focus,
.tib-textarea:focus {
    outline: none;
    border-color: var(--tib-dorado);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

.tib-input::placeholder,
.tib-textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.tib-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--tib-transicion);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff8c00' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.tib-select:focus {
    outline: none;
    border-color: var(--tib-dorado);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

.tib-select option {
    background: var(--tib-rojo-oscuro);
    color: #fff;
}

.tib-btn-consultar {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--tib-gradiente-oro);
    color: #2d0a0a;
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tib-transicion);
    margin-top: 1.5rem;
    font-family: inherit;
}

.tib-btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
}

.tib-instruccion {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* ================================================
   LOADING - DHARMA WHEEL
   ================================================ */

.tib-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.tib-loading-rueda {
    width: 100px;
    height: 100px;
    position: relative;
    margin-bottom: 1.5rem;
}

.tib-rueda-exterior {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 140, 0, 0.3);
    border-radius: 50%;
    animation: tibGirarRueda 6s linear infinite;
}

.tib-rueda-interior {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 70px;
    height: 70px;
    border: 2px dashed rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    animation: tibGirarRuedaInversa 8s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tib-rueda-eje {
    font-size: 2rem;
    animation: tibPulsoEje 2s ease-in-out infinite;
}

@keyframes tibPulsoEje {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.2); filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 140, 0, 0.5)); }
}

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

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

.tib-loading-texto {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    animation: tibPulsoTexto 1.5s ease-in-out infinite;
}

@keyframes tibPulsoTexto {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ================================================
   FASE RESULTADO
   ================================================ */

.tib-resultado-contenido {
    padding: 2rem 1rem;
}

.tib-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 140, 0, 0.12);
    border-radius: var(--tib-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: tibSlideIn 0.6s ease both;
}

.tib-seccion:nth-child(1) { animation-delay: 0s; }
.tib-seccion:nth-child(2) { animation-delay: 0.08s; }
.tib-seccion:nth-child(3) { animation-delay: 0.15s; }
.tib-seccion:nth-child(4) { animation-delay: 0.2s; }

@keyframes tibSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.tib-seccion-titulo {
    color: var(--tib-dorado);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ================================================
   AREA CARD
   ================================================ */

.tib-area-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.tib-area-icono {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tib-area-nombre {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.tib-pregunta-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.93rem;
    margin-bottom: 0.8rem;
}

.tib-pregunta-box strong {
    color: var(--tib-dorado);
}

/* ================================================
   LECTURA MO
   ================================================ */

.tib-lectura-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.tib-lectura-icono {
    font-size: 2rem;
    flex-shrink: 0;
}

.tib-lectura-info {
    flex: 1;
}

.tib-lectura-titulo {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.tib-lectura-tipo {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.tib-lectura-texto {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-style: italic;
}

/* ================================================
   SABIDURIA
   ================================================ */

.tib-sabiduria-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.tib-sabiduria-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tib-dorado);
}

.tib-sabiduria-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
}

/* ================================================
   CONSEJO
   ================================================ */

.tib-consejo-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 140, 0, 0.06);
    border: 1px solid rgba(255, 140, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.tib-consejo-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tib-azafran);
}

.tib-consejo-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ================================================
   MANTRA
   ================================================ */

.tib-mantra-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(139, 0, 0, 0.15);
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
}

.tib-mantra-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tib-carmesi);
}

.tib-mantra-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
}

/* ================================================
   AFIRMACIONES
   ================================================ */

.tib-afirmacion-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    line-height: 1.5;
}

.tib-afirmacion-item:last-child {
    margin-bottom: 0;
}

.tib-afirmacion-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
    color: var(--tib-dorado);
}

/* ================================================
   NUEVA CONSULTA
   ================================================ */

.tib-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 2px solid rgba(255, 140, 0, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tib-transicion);
    font-family: inherit;
}

.tib-btn-nueva:hover {
    background: rgba(255, 140, 0, 0.15);
    border-color: var(--tib-dorado);
    transform: translateY(-2px);
}

/* ================================================
   FONDO
   ================================================ */

.tib-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(45, 10, 10, 0.8) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 140, 0, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
    animation: tibFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

.tib-fase { position: relative; z-index: 1; }
.tib-loading { position: relative; z-index: 1; }

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
    .tib-titulo-form { font-size: 1.6rem; }
    .tib-icono-oraculo { font-size: 3rem; }
    .tib-area-header { flex-direction: column; text-align: center; }
    .tib-lectura-header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .tib-form-contenido { padding: 1.5rem 0.5rem; }
    .tib-titulo-form { font-size: 1.4rem; }
    .tib-subtitulo-form { font-size: 0.85rem; }
    .tib-resultado-contenido { padding: 1.5rem 0.5rem; }
    .tib-seccion { padding: 1.2rem; }
    .tib-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .tib-btn-consultar { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
}

/* ================================================
   ACCESIBILIDAD
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .tib-app::before { animation: none; }
    .tib-icono-oraculo { animation: none; }
    .tib-destello { animation: none; display: none; }
    .tib-rueda-exterior,
    .tib-rueda-interior,
    .tib-rueda-eje { animation: none; }
    .tib-loading-texto { animation: none; opacity: 1; }
    .tib-seccion { animation: none; opacity: 1; transform: none; }
    * { transition-duration: 0.05ms !important; animation-duration: 0.05ms !important; }
}

@media (prefers-contrast: high) {
    .tib-seccion { border: 2px solid rgba(255, 255, 255, 0.4); }
    .tib-input { border: 2px solid rgba(255, 255, 255, 0.4); }
    .tib-select { border: 2px solid rgba(255, 255, 255, 0.4); }
}

@media print {
    .tib-app::before { display: none; }
    .tib-btn-nueva { display: none; }
    .tib-seccion { break-inside: avoid; }
}
