/* ================================================
   TAROT CONSEJOS - CARTA DEL DIA - APP STYLES
   ================================================ */

.tc-app {
    --tc-dorado: #ffd700;
    --tc-purpura: #9b59b6;
    --tc-purpura-oscuro: #6c3483;
    --tc-purpura-claro: #c39bd3;
    --tc-azul: #5b7db1;
    --tc-gradiente-mistico: linear-gradient(135deg, #6c3483 0%, #9b59b6 50%, #5b7db1 100%);
    --tc-gradiente-dorado: linear-gradient(135deg, #ffd700 0%, #f0c420 100%);
    --tc-sombra: 0 10px 30px rgba(155, 89, 182, 0.15);
    --tc-sombra-hover: 0 15px 40px rgba(155, 89, 182, 0.25);
    --tc-radio: 16px;
    --tc-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

/* ================================================
   FASE PREGUNTA
   ================================================ */

.tc-fase {
    animation: tcFadeIn 0.6s ease;
}

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

.tc-pregunta-contenido {
    text-align: center;
    padding: 2.5rem 1rem;
}

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

@keyframes tcBrillar {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); }
}

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

.tc-destello::before { content: '✦'; }
.tc-d2::before { content: '✧'; }
.tc-d3::before { content: '⭐'; }

.tc-d2 { animation-delay: -1s; top: -8px; right: 20px; }
.tc-d3 { animation-delay: -2s; bottom: 5px; left: 25px; }

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

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

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

.tc-instruccion {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Carta del dia centrada */
.tc-carta-dia-contenedor {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    perspective: 1000px;
}

.tc-carta-dia {
    width: 180px;
    height: 280px;
    perspective: 1000px;
    cursor: pointer;
    transition: var(--tc-transicion);
}

.tc-carta-dia:hover {
    transform: translateY(-10px);
}

.tc-carta-dia.revelada {
    cursor: default;
}

.tc-carta-dia.revelada:hover {
    transform: none;
}

.tc-carta-dia-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.tc-carta-dia.revelada .tc-carta-dia-inner {
    transform: rotateY(180deg);
}

.tc-carta-dia-reverso {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    background: var(--tc-gradiente-mistico);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 12px 35px rgba(108, 52, 131, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tc-carta-dia-reverso::before {
    content: '';
    position: absolute;
    top: 12px; left: 12px; right: 12px; bottom: 12px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
}

.tc-carta-dia-reverso::after {
    content: '✨';
    font-size: 3rem;
    color: rgba(255, 215, 0, 0.25);
    position: absolute;
}

.tc-carta-dia-patron {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.04) 0%, transparent 60%),
        repeating-linear-gradient(
            45deg,
            transparent, transparent 12px,
            rgba(255, 255, 255, 0.02) 12px,
            rgba(255, 255, 255, 0.02) 24px
        );
}

.tc-carta-dia-signo {
    font-size: 3rem;
    color: rgba(255, 215, 0, 0.6);
    z-index: 1;
    font-weight: 700;
}

/* Hover sobre carta sin revelar */
.tc-carta-dia:not(.revelada):hover .tc-carta-dia-reverso {
    box-shadow: 0 20px 50px rgba(108, 52, 131, 0.5);
    border-color: rgba(255, 215, 0, 0.5);
}

/* Loading */
.tc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.tc-loading-carta {
    width: 50px;
    height: 75px;
    background: var(--tc-gradiente-mistico);
    border-radius: 10px;
    animation: tcBarajar 1.2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

@keyframes tcBarajar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(-5deg); }
    75% { transform: translateY(5px) rotate(3deg); }
}

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

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

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

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

.tc-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tc-resultado-titulo {
    font-size: 1.8rem;
    background: var(--tc-gradiente-dorado);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.tc-resultado-subtitulo {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.tc-resultado-carta {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--tc-radio);
    padding: 2rem;
    animation: tcSlideIn 0.6s ease;
}

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

.tc-resultado-carta-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.tc-resultado-carta-simbolo {
    font-size: 3.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    flex-shrink: 0;
}

.tc-resultado-carta-simbolo.tc-simbolo-mayor { background: rgba(155, 89, 182, 0.15); }
.tc-resultado-carta-simbolo.tc-simbolo-copas { background: rgba(255, 107, 157, 0.15); }
.tc-resultado-carta-simbolo.tc-simbolo-espadas { background: rgba(100, 149, 237, 0.15); }
.tc-resultado-carta-simbolo.tc-simbolo-bastos { background: rgba(255, 165, 0, 0.15); }
.tc-resultado-carta-simbolo.tc-simbolo-oros { background: rgba(255, 215, 0, 0.15); }

.tc-resultado-carta-info h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.tc-resultado-carta-info .tc-arcano-badge {
    font-size: 0.8rem;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
}

.tc-arcano-badge.tc-badge-mayor { background: rgba(155, 89, 182, 0.2); color: #c39bd3; }
.tc-arcano-badge.tc-badge-copas { background: rgba(255, 107, 157, 0.2); color: #ffa8c8; }
.tc-arcano-badge.tc-badge-espadas { background: rgba(100, 149, 237, 0.2); color: #87cefa; }
.tc-arcano-badge.tc-badge-bastos { background: rgba(255, 165, 0, 0.2); color: #ffa500; }
.tc-arcano-badge.tc-badge-oros { background: rgba(255, 215, 0, 0.2); color: #ffd700; }

.tc-resultado-significado {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.tc-resultado-carta-consejo {
    background: rgba(255, 215, 0, 0.08);
    border-left: 3px solid var(--tc-dorado);
    padding: 1rem 1.2rem;
    border-radius: 0 10px 10px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-style: italic;
}

.tc-resultado-carta-consejo::before { content: '💡 '; }

/* Consejo final */
.tc-resultado-consejo {
    margin-top: 2rem;
    text-align: center;
    padding: 2rem;
    background: rgba(155, 89, 182, 0.08);
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: var(--tc-radio);
}

.tc-resultado-consejo h3 {
    color: var(--tc-dorado);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tc-resultado-consejo p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* Boton nueva consulta */
.tc-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, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tc-transicion);
    margin-top: 2rem;
    font-family: inherit;
}

.tc-btn-nueva:hover {
    background: rgba(155, 89, 182, 0.15);
    border-color: var(--tc-purpura);
    transform: translateY(-2px);
}

/* ================================================
   PARTICULAS DE FONDO
   ================================================ */

.tc-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(155, 89, 182, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 215, 0, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(91, 125, 177, 0.05) 0%, transparent 50%);
    animation: tcFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .tc-titulo-pregunta { font-size: 1.6rem; }
    .tc-icono-dia { font-size: 3rem; }
    .tc-carta-dia { width: 150px; height: 230px; }
    .tc-resultado-carta { padding: 1.5rem; }
    .tc-resultado-carta-simbolo { width: 65px; height: 65px; font-size: 2.8rem; }
}

@media (max-width: 480px) {
    .tc-pregunta-contenido { padding: 1.5rem 0.5rem; }
    .tc-titulo-pregunta { font-size: 1.4rem; }
    .tc-subtitulo-pregunta { font-size: 0.85rem; }
    .tc-carta-dia { width: 130px; height: 200px; }
    .tc-resultado-carta { padding: 1.2rem; }
    .tc-resultado-carta-simbolo { width: 55px; height: 55px; font-size: 2.2rem; }
    .tc-resultado-carta-info h3 { font-size: 1.1rem; }
    .tc-resultado-carta-header { gap: 0.8rem; }
    .tc-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
}

@media (max-width: 360px) {
    .tc-carta-dia { width: 110px; height: 170px; }
}

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

@media (prefers-reduced-motion: reduce) {
    .tc-app::before { animation: none; }
    .tc-icono-dia { animation: none; }
    .tc-destello { animation: none; display: none; }
    .tc-loading-carta { animation: none; }
    .tc-loading-texto { animation: none; opacity: 1; }
    .tc-carta-dia-inner { transition-duration: 0.01ms; }
    .tc-resultado-carta { animation: none; opacity: 1; transform: none; }
    * { transition-duration: 0.05ms !important; animation-duration: 0.05ms !important; }
}

@media (prefers-contrast: high) {
    .tc-carta-dia-reverso { border: 3px solid white; }
    .tc-resultado-carta { border: 2px solid rgba(255, 255, 255, 0.5); }
}

@media print {
    .tc-app::before { display: none; }
    .tc-btn-nueva { display: none; }
    .tc-resultado-carta { break-inside: avoid; }
}