/* TabeerIQ Cutting-Edge Design System */

/* Modern Variables */
:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #1a6b3c 0%, #c9a84c 100%);
    --gradient-islamic: linear-gradient(135deg, #1a6b3c 0%, #0a1628 100%);
    --gradient-gold: linear-gradient(135deg, #c9a84c 0%, #a07830 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(201, 168, 76, 0.15);
    --glow-primary: 0 0 30px rgba(26, 107, 60, 0.3);
    --glow-gold: 0 0 30px rgba(201, 168, 76, 0.4);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--glow-primary);
}

/* Neumorphic Elements */
.neu-button {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: none;
    border-radius: 15px;
    box-shadow: 8px 8px 16px #0d0d1a, -8px -8px 16px #272742;
    transition: all 0.3s ease;
}

.neu-button:hover {
    box-shadow: 4px 4px 8px #0d0d1a, -4px -4px 8px #272742;
    transform: scale(0.98);
}

.neu-button:active {
    box-shadow: inset 4px 4px 8px #0d0d1a, inset -4px -4px 8px #272742;
}

/* Advanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 40px rgba(16, 185, 129, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

.float-animation {
    animation: float 6s ease-in-out infinite;
}

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

.shimmer-text {
    background: linear-gradient(90deg, #10b981 0%, #38ef7d 25%, #fff 50%, #38ef7d 75%, #10b981 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

/* Interpretation Page Enhancements */
.interpretation-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--gradient-islamic);
    padding: 3rem;
}

.interpretation-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
    animation: rotate-slow 60s linear infinite;
    pointer-events: none;
}

.dream-journey-timeline {
    position: relative;
    padding-left: 40px;
}

.dream-journey-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #10b981, #065f46);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding: 20px 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 28px;
    width: 16px;
    height: 16px;
    background: var(--gradient-success);
    border-radius: 50%;
    border: 3px solid #1a1a2e;
    box-shadow: var(--glow-primary);
}

/* Confidence Heatmap */
.confidence-heatmap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.heatmap-cell {
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.heatmap-cell.high { background: rgba(16, 185, 129, 0.3); border: 2px solid #10b981; }
.heatmap-cell.medium { background: rgba(245, 175, 25, 0.3); border: 2px solid #f5af19; }
.heatmap-cell.low { background: rgba(239, 68, 68, 0.2); border: 2px solid #ef4444; }

/* Modern Tabs */
.modern-tabs {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.modern-tab {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.modern-tab.active {
    background: var(--gradient-islamic);
    color: #fff;
    box-shadow: var(--glow-primary);
}

/* AI Insight Cards */
.ai-insight-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.ai-insight-card::before {
    content: 'AI';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    background: var(--gradient-primary);
    border-radius: 6px;
}

/* Scholar Match Card */
.scholar-match-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 95, 70, 0.2) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.4s ease;
}

.scholar-match-card:hover {
    transform: scale(1.02);
    box-shadow: var(--glow-primary);
}

/* Progress Ring */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.progress-ring .bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.progress-ring .progress {
    stroke: url(#gradient);
    transition: stroke-dashoffset 1s ease-out;
}

.progress-ring .value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.fab-primary {
    background: var(--gradient-islamic);
}

.fab-secondary {
    background: var(--gradient-gold);
}

.fab:hover {
    transform: scale(1.1);
}

/* Micro-interactions */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.click-shrink:active {
    transform: scale(0.95);
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Notification Badge */
.notification-pulse {
    position: relative;
}

.notification-pulse::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-card {
        border-radius: 16px;
    }
    
    .interpretation-hero {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .modern-tabs {
        flex-wrap: wrap;
    }
    
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
}

/* Print Styles */
@media print {
    .glass-card,
    .ai-insight-card {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #ccc !important;
    }
    
    .no-print {
        display: none !important;
    }
}

/* Enhanced User Experience Styles */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Better Focus States for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Enhanced Form Inputs */
.form-control-enhanced {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control-enhanced:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-control-enhanced::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Enhanced Buttons */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced-primary {
    background: var(--gradient-islamic);
    color: white;
}

.btn-enhanced-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-enhanced-secondary {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: white;
}

.btn-enhanced-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Card Hover Effects */
.card-hover-3d {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-hover-3d:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(16, 185, 129, 0.1);
}

/* Gradient Border Effect */
.gradient-border {
    position: relative;
    background: #1a1a2e;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #10b981, #065f46, #059669, #10b981);
    border-radius: 18px;
    z-index: -1;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Typing Effect */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid #10b981;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #10b981; }
}

/* Tooltip Enhancement */
.tooltip-enhanced {
    position: relative;
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.tooltip-enhanced:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulse-glow 2s infinite;
}

.status-dot.offline {
    background: #6b7280;
}

.status-dot.busy {
    background: #f59e0b;
    animation: pulse-glow 1s infinite;
}

/* Enhanced Loading Spinner */
.spinner-enhanced {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notification Badge */
.badge-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Enhanced Cards */
.info-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 95, 70, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.warning-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    padding: 24px;
}

/* Progress Bar Enhanced */
.progress-enhanced {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-enhanced-bar {
    height: 100%;
    background: var(--gradient-islamic);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-enhanced-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Section Dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
    margin: 3rem 0;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: #10b981;
    margin-right: 12px;
    margin-top: 4px;
}

/* Quote Box */
.quote-box {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #10b981;
    padding: 24px 24px 24px 32px;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.quote-box::before {
    content: '"';
    position: absolute;
    left: 12px;
    top: 8px;
    font-size: 3rem;
    color: rgba(16, 185, 129, 0.3);
    font-family: Georgia, serif;
    line-height: 1;
}

/* Animated Underline */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-islamic);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .btn-enhanced {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .glass-card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .fab-container {
        bottom: 20px;
        right: 15px;
    }
    
    .fab {
        width: 48px;
        height: 48px;
    }
    
    .interpretation-hero {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .modern-tabs {
        overflow-x: auto;
        padding: 6px;
    }
    
    .modern-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .confidence-heatmap {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
