/* Mystical Theme Extensions */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-mystical);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(20, 184, 166, 0.2);
}

.modal-title {
    font-size: 1.5rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--primary-teal);
    background: rgba(20, 184, 166, 0.1);
}

.modal-body {
    padding: 1rem 2rem 2rem;
}

.modal-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.modal-footer-text a {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.mystical-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(20, 184, 166, 0.3);
    border-top: 3px solid var(--primary-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-mystical);
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Tool Pages */
.tool-page {
    min-height: 100vh;
    padding: 6rem 0 4rem;
    background: linear-gradient(180deg, transparent 0%, rgba(20, 184, 166, 0.05) 50%, transparent 100%);
}

.tool-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tool-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.tool-main {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: 1rem;
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(20, 184, 166, 0.5);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary-teal);
    background: rgba(20, 184, 166, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary-teal);
    background: rgba(20, 184, 166, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-teal);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Progress Bar */
.progress-container {
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(20, 184, 166, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal), var(--secondary-cyan));
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Reading Results */
.reading-result {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-mystical);
    animation: slideUp 0.5s ease-out;
}

.reading-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(20, 184, 166, 0.2);
}

.reading-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reading-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.reading-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 0.75rem;
    padding: 0.25rem;
}

.reading-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.reading-tab.active {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.reading-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.reading-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Grid (for Tarot, etc.) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.mystical-card {
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: var(--border-glass);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.mystical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.mystical-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: var(--shadow-mystical);
}

.mystical-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-teal);
}

.card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-position {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive Design for Tool Pages */
@media (max-width: 768px) {
    .tool-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tool-main,
    .sidebar-card {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .reading-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

