/* Estilos para el sistema de carta astral - AudioSub */

/* Variables CSS siguiendo la guía de estilos */
:root {
    --astral-primary: #7C55FA;
    --astral-dark: #1C1C1E;
    --astral-white: #ffffff;
    --astral-white-translucent: rgba(255, 255, 255, 0.05);
    --astral-blue: #3b82f6;
    --astral-gray: #9CA3AF;
    --astral-red-special: rgb(220 38 38 / 50%);
    --astral-border: #3A3A3C;
}

/* Fondo general */
body {
    background: radial-gradient(at top left, #264691 0%, #000000 44%);
    min-height: 100vh;
    margin: 0;
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--astral-white);
}

/* Contenedor principal */
.astral-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: var(--astral-white-translucent);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Header y navegación */
.astral-header {
    margin-bottom: 2rem;
}

.astral-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.astral-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--astral-dark);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--astral-gray);
    user-select: none;
}

.astral-nav-item:hover {
    background: rgba(124, 85, 250, 0.1);
    border-color: rgba(124, 85, 250, 0.3);
    color: var(--astral-white);
}

.astral-nav-item.active {
    background: var(--astral-primary);
    color: var(--astral-white);
    border-color: var(--astral-primary);
}

/* Iconos */
.astral-icon {
    font-size: 1.2em;
    display: inline-block;
}

/* Secciones */
.astral-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.astral-section.active {
    display: block;
}

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

/* Tarjetas */
.astral-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Títulos */
.astral-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--astral-white);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Formularios */
.astral-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.astral-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.astral-label {
    font-weight: 600;
    color: var(--astral-white);
    font-size: 1rem;
}

.astral-input {
    background-color: var(--astral-dark);
    border: 1px solid var(--astral-border);
    border-radius: 8px;
    color: var(--astral-white);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.astral-input:focus {
    outline: none;
    border-color: var(--astral-primary);
    box-shadow: 0 0 0 3px rgba(124, 85, 250, 0.1);
}

.astral-hint {
    color: var(--astral-gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Botones */
.astral-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.astral-btn-primary {
    background: var(--astral-primary);
    color: var(--astral-white);
}

.astral-btn-primary:hover {
    background: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 85, 250, 0.3);
}

.astral-btn-secondary {
    background: var(--astral-dark);
    color: var(--astral-white);
    border: 1px solid var(--astral-border);
}

.astral-btn-secondary:hover {
    background: #2C2C2E;
    border-color: var(--astral-primary);
}

/* Información del signo zodiacal */
.astral-sign-display {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.astral-sign-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.astral-sign-icon {
    font-size: 3rem;
    background: var(--astral-primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.astral-sign-text h3 {
    margin: 0 0 0.5rem 0;
    color: var(--astral-blue);
    font-size: 1.1rem;
}

.astral-sign-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--astral-white);
    margin: 0;
}

/* Horóscopo */
.astral-horoscope-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.astral-date {
    font-size: 1.1rem;
    color: var(--astral-gray);
    font-weight: 500;
}

.astral-sign-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--astral-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.astral-horoscope-content {
    min-height: 200px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Recomendaciones de audio */
.astral-audio-intro {
    margin-bottom: 1.5rem;
}

.astral-description {
    color: var(--astral-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.astral-recommendations-content {
    min-height: 300px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Mensajes informativos */
.info-message {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--astral-blue);
    font-size: 0.9rem;
}

.upgrade-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
    color: var(--astral-gray);
    font-size: 0.9rem;
}

/* Loading y spinners */
.astral-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.astral-loading p {
    color: var(--astral-gray);
    margin: 0;
}

.astral-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 85, 250, 0.3);
    border-top: 3px solid var(--astral-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.astral-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(124, 85, 250, 0.3);
    border-top: 4px solid var(--astral-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay de carga */
.astral-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.astral-loading-content {
    background: var(--astral-white-translucent);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.astral-loading-content p {
    margin-top: 1rem;
    color: var(--astral-white);
    font-size: 1.1rem;
}

/* Login requerido */
.astral-login-required {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--astral-white-translucent);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.astral-login-required p {
    color: var(--astral-gray);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.astral-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--astral-primary);
    color: var(--astral-white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.astral-login-btn:hover {
    background: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 85, 250, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .astral-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .astral-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .astral-nav-item {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }
    
    .astral-title {
        font-size: 1.5rem;
    }
    
    .astral-horoscope-header {
        flex-direction: column;
        text-align: center;
    }
    
    .astral-sign-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .astral-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .astral-card {
        padding: 1.5rem;
    }
    
    .astral-title {
        font-size: 1.3rem;
    }
}

/* Estados especiales */
.astral-input.error {
    border-color: var(--astral-red-special);
    box-shadow: 0 0 10px var(--astral-red-special);
}

.astral-success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #22c55e;
    font-size: 0.9rem;
}

.astral-error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    font-size: 0.9rem;
}

/* Animaciones adicionales */
.astral-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.astral-btn:active {
    transform: translateY(0);
}

/* Efectos de brillo para elementos especiales */
.astral-sign-icon,
.astral-spinner,
.astral-spinner-large {
    box-shadow: 0 0 20px rgba(124, 85, 250, 0.3);
}

/* Estilos para campos bloqueados y modo de edición */
.astral-input[readonly] {
    background-color: rgba(28, 28, 30, 0.5);
    border-color: rgba(58, 58, 60, 0.5);
    color: var(--astral-gray);
    cursor: not-allowed;
    opacity: 0.7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 16px;
    padding-right: 40px;
}

.astral-input[readonly]:hover {
    border-color: rgba(58, 58, 60, 0.5);
}

.astral-input.editable {
    background-color: var(--astral-dark);
    border-color: var(--astral-primary);
    opacity: 1;
    cursor: text;
    animation: pulse-border 1.5s ease-in-out;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--astral-primary); }
    50% { border-color: #8b5cf6; }
}

/* Controles del formulario */
.astral-form-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Botón de cancelar */
.astral-btn-cancel {
    background: rgba(239, 68, 68, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.astral-btn-cancel:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

/* Estado del formulario en modo edición */
.astral-form.editing {
    position: relative;
}

.astral-form.editing::before {
    content: "✏️ Modo de edición activado";
    display: block;
    background: rgba(124, 85, 250, 0.15);
    border: 1px solid rgba(124, 85, 250, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--astral-primary);
    font-weight: 600;
    font-size: 0.9rem;
    animation: fadeInSlide 0.3s ease-out;
}

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

/* Indicador visual de campo editable */
.astral-input.editable::placeholder {
    color: rgba(124, 85, 250, 0.5);
}

/* Efecto de enfoque mejorado para campos editables */
.astral-input.editable:focus {
    border-color: var(--astral-primary);
    box-shadow: 0 0 0 3px rgba(124, 85, 250, 0.2);
    background-color: rgba(28, 28, 30, 0.9);
}

/* Responsive para controles del formulario */
@media (max-width: 480px) {
    .astral-form-controls {
        flex-direction: column;
    }
    
    .astral-form-controls .astral-btn {
        width: 100%;
    }
}
