* {
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --secondary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #f9fafb;
    --shadow-primary: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    --secondary-gradient: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    --glass-bg: rgba(31, 41, 55, 0.95);
    --glass-border: rgba(75, 85, 99, 0.3);
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --shadow-primary: rgba(16, 185, 129, 0.5);
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #111827 50%, #1f2937 75%, #1e293b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #f9fafb;
}

[data-theme="dark"] body::before {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
}

[data-theme="dark"] body::after {
    background: 
        linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.08) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 8s linear infinite;
}

/* Dark mode glass effects */
[data-theme="dark"] .glass-effect {
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .glass-effect:hover {
    background: rgba(31, 41, 55, 0.95);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Dark mode step cards */
[data-theme="dark"] .step-card {
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.4);
    color: #f9fafb;
}

[data-theme="dark"] .step-card:hover {
    background: rgba(31, 41, 55, 0.95);
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .step-card h3,
[data-theme="dark"] .step-card p {
    color: #f9fafb;
}

[data-theme="dark"] .step-card .text-gray-600 {
    color: #d1d5db !important;
}

/* Dark mode tabs */
[data-theme="dark"] .tab-btn {
    background: rgba(31, 41, 55, 0.8);
    color: #d1d5db;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .tab-btn:hover {
    background: rgba(31, 41, 55, 0.95);
    color: #f9fafb;
}

[data-theme="dark"] .tab-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: transparent;
}

/* Dark mode modal */
[data-theme="dark"] .modal .bg-white {
    background: #1f2937 !important;
}

[data-theme="dark"] #modalDescription,
[data-theme="dark"] #modalInstruction,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700 {
    color: #f9fafb !important;
}

[data-theme="dark"] #modalPrayer {
    background: rgba(16, 185, 129, 0.15) !important;
}

[data-theme="dark"] #modalPrayer p {
    color: #f9fafb !important;
}

/* Dark mode welcome section */
[data-theme="dark"] #welcome-title {
    color: #f9fafb !important;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .text-gray-600 {
    color: #d1d5db !important;
}

/* Dark mode quiz */
[data-theme="dark"] .quiz-option {
    background: rgba(31, 41, 55, 0.8);
    color: #f9fafb;
    border-color: rgba(75, 85, 99, 0.4);
}

[data-theme="dark"] .quiz-option:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

[data-theme="dark"] .quiz-option.correct {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #f9fafb;
}

[data-theme="dark"] .quiz-option.wrong {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f9fafb;
}

/* Dark mode progress */
[data-theme="dark"] .progress-container {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-top-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .progress-bg {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

[data-theme="dark"] .progress-label {
    color: #f9fafb;
}

/* Dark mode buttons */
[data-theme="dark"] .bg-blue-50 {
    background: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="dark"] .text-blue-800,
[data-theme="dark"] .text-blue-700 {
    color: #93c5fd !important;
}

[data-theme="dark"] .bg-green-50 {
    background: rgba(16, 185, 129, 0.15) !important;
}

/* Dark mode navigation background */
[data-theme="dark"] nav .bg-white\/50 {
    background: rgba(31, 41, 55, 0.7) !important;
    backdrop-filter: blur(10px);
}

/* Dark mode practice section */
[data-theme="dark"] .practice-step {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #f9fafb;
}

[data-theme="dark"] .practice-step:hover {
    background: rgba(16, 185, 129, 0.25) !important;
}

/* Practice step cards — light/dark */
.practice-step-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #bbf7d0;
}

.practice-step-title {
    color: #374151;
}

[data-theme="dark"] .practice-step-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] .practice-step-title {
    color: #d1fae5;
}

/* Dark mode guide sections */
[data-theme="dark"] .bg-green-50,
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-purple-50 {
    background: rgba(31, 41, 55, 0.8) !important;
}

[data-theme="dark"] .bg-green-50 h4,
[data-theme="dark"] .bg-blue-50 h4,
[data-theme="dark"] .bg-purple-50 h4,
[data-theme="dark"] .bg-green-50 li,
[data-theme="dark"] .bg-blue-50 li,
[data-theme="dark"] .bg-purple-50 li {
    color: #f9fafb !important;
}

/* ── Guide cards dark mode ── */
[data-theme="dark"] .guide-card {
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    border-color: rgba(75, 85, 99, 0.4) !important;
}

/* Quran verse box */
[data-theme="dark"] .guide-card .bg-green-100 {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}
[data-theme="dark"] .guide-card .text-green-900,
[data-theme="dark"] .guide-card .text-green-800 {
    color: #6ee7b7 !important;
}
[data-theme="dark"] .guide-card .text-green-700,
[data-theme="dark"] .guide-card .text-green-600 {
    color: #34d399 !important;
}

/* Step item boxes inside guide cards */
[data-theme="dark"] .guide-card .bg-white\/70,
[data-theme="dark"] .guide-card .hover\:bg-white {
    background: rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .guide-card .bg-white\/70:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .guide-card .text-gray-600,
[data-theme="dark"] .guide-card .text-gray-500 {
    color: #d1d5db !important;
}
[data-theme="dark"] .guide-card .text-gray-800 {
    color: #f3f4f6 !important;
}

/* Dua box */
[data-theme="dark"] .guide-card .bg-emerald-50 {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}
[data-theme="dark"] .guide-card .text-emerald-800,
[data-theme="dark"] .guide-card .text-emerald-900 {
    color: #6ee7b7 !important;
}
[data-theme="dark"] .guide-card .text-emerald-600 {
    color: #34d399 !important;
}

/* Purple pillars card */
[data-theme="dark"] .guide-card .bg-purple-100 {
    background: rgba(139, 92, 246, 0.15) !important;
}
[data-theme="dark"] .guide-card .text-purple-700 {
    color: #c4b5fd !important;
}
[data-theme="dark"] .guide-card .bg-purple-50 {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}
[data-theme="dark"] .guide-card .text-purple-800 {
    color: #c4b5fd !important;
}

/* Amber tips card */
[data-theme="dark"] .guide-card .bg-white\/70 {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Prayer times card inner items */
[data-theme="dark"] #prayerTimesCard {
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* Amber tips card dark mode text */
[data-theme="dark"] .guide-card .text-gray-800 {
    color: #f3f4f6 !important;
}
[data-theme="dark"] .guide-card .text-gray-500 {
    color: #d1d5db !important;
}

/* Guide tab heading dark mode */
[data-theme="dark"] #guideTab h3.text-gray-800 {
    color: #f9fafb !important;
}

/* Prayer times inner light-bg cards dark mode */
[data-theme="dark"] #prayerTimesBody [style*="background:#fff"],
[data-theme="dark"] #prayerTimesBody [style*="background: #fff"] {
    background: rgba(255,255,255,0.05) !important;
}
[data-theme="dark"] #prayerTimesBody .text-gray-400 {
    color: #9ca3af !important;
}

body {
    background: transparent;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

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

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #111827 50%, #1f2937 75%, #374151 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

[data-theme="dark"] body::before {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
}

.gradient-bg {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

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

.gradient-bg:hover::before {
    left: 100%;
}

.gradient-purple {
    background: var(--secondary-gradient);
    position: relative;
    overflow: hidden;
}

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

.gradient-purple:hover::before {
    left: 100%;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.step-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.step-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px var(--shadow-primary);
}

.step-card:hover::before {
    opacity: 0.05;
}

.step-card.completed {
    border: 3px solid #10b981;
}

.step-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    left: 10px;
    background: #10b981;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

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

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(50px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.progress-bar {
    transition: width 0.5s ease;
}

.tab-btn {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.6s ease;
}

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

.tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.tab-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

.tab-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.tab-btn.active::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.tab-btn.active:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
    transform: translateY(-4px);
}

.tab-btn:active {
    transform: translateY(-1px);
}

.hero-pattern {
    background-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.scroll-smooth {
    scroll-behavior: smooth;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.audio-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.audio-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.audio-btn.playing {
    background: linear-gradient(45deg, #10b981, #059669, #34d399, #10b981);
    background-size: 300% 100%;
    animation: audioPlaying 2s linear infinite;
}

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

.quiz-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.quiz-option:hover {
    background: #f0fdf4;
    border-color: #10b981;
}

.quiz-option.correct {
    background: #d1fae5;
    border-color: #10b981;
}

.quiz-option.wrong {
    background: #fee2e2;
    border-color: #ef4444;
}

@media (max-width: 768px) {
    .hero-pattern {
        padding: 2rem 0;
    }
    
    .step-card {
        margin-bottom: 1rem;
    }
    
    #modalPrayer p {
        font-size: 1.2rem !important;
    }
    
    #modalPrayer p > div {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #modalPrayer p > div {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Prayer text styling - notebook style with lines */
#modalPrayer p {
    display: block;
}
/* Enhanced animations and effects */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.step-card:hover .step-number {
    animation: bounce 0.6s ease;
}

.quiz-option.wrong {
    animation: shake 0.5s ease;
}

.quiz-option.correct {
    animation: bounce 0.5s ease;
}



/* Video modal enhancements */
.video-modal {
    backdrop-filter: blur(15px);
}

.video-modal iframe {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Modern Progress Bar Enhancements */
.progress-bar {
    background: linear-gradient(90deg, #10b981, #059669, #34d399, #10b981);
    background-size: 200% 100%;
    animation: progressShine 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progressGloss 2s ease-in-out infinite;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
}

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

@keyframes progressGloss {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Modern Progress Container */
.progress-container {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
}

.progress-wrapper {
    position: relative;
}

.progress-bg {
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent);
    border-radius: 9999px 9999px 0 0;
}

.progress-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #374151;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.progress-label i {
    color: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

.progress-percentage {
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.progress-percentage::before {
    content: '🎯';
    -webkit-text-fill-color: initial;
    font-size: 1.25rem;
}

/* Restart button */
.restart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    border-radius: 999px;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.restart-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.restart-btn i {
    transition: transform 0.4s ease;
}

.restart-btn:hover i {
    transform: rotate(-180deg);
}

[data-theme="dark"] .restart-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

[data-theme="dark"] .restart-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #fca5a5;
}

/* Dark mode footer */
[data-theme="dark"] footer.gradient-bg {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%) !important;
}

/* Dark mode header */
[data-theme="dark"] header.hero-pattern {
    background-color: #111827 !important;
    background-image: none !important;
}

/* Dark mode progress styles */
[data-theme="dark"] .progress-container {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-top-color: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .progress-bg {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

[data-theme="dark"] .progress-label {
    color: #f9fafb;
}

/* Milestone markers */
.progress-milestones {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    pointer-events: none;
}

.progress-milestone {
    width: 3px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Prayer times styling */
.prayer-times {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.prayer-time-item {
    transition: all 0.3s ease;
}

.prayer-time-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive enhancements */
@media (max-width: 640px) {
    .modal .w-full {
        margin: 10px;
    }
    
    .modal iframe {
        height: 250px;
    }
}

/* Modern Mosque Icon */
.modern-mosque-icon {
    filter: drop-shadow(0 8px 25px rgba(16, 185, 129, 0.4));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-icon:hover .modern-mosque-icon {
    transform: scale(1.08) translateY(-5px);
    filter: drop-shadow(0 12px 35px rgba(16, 185, 129, 0.5));
}

/* Welcome logo */
.welcome-logo-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(16,185,129,0.35));
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    animation: floatLogo 4s ease-in-out infinite;
}

.welcome-logo-img:hover {
    filter: drop-shadow(0 14px 36px rgba(16,185,129,0.55));
    transform: scale(1.07) translateY(-6px);
}

/* Light mode: show light logo, hide dark logo */
.welcome-logo-dark { display: none; }
.welcome-logo-light { display: block; }
.welcome-logo-dark-wrap { display: none; }

/* Dark mode: show dark logo, hide light logo */
[data-theme="dark"] .welcome-logo-light { display: none; }
[data-theme="dark"] .welcome-logo-dark-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, rgba(0,0,0,0) 70%);
    box-shadow: 0 0 40px rgba(16,185,129,0.25), 0 0 80px rgba(16,185,129,0.1);
    animation: floatLogo 4s ease-in-out infinite;
}

[data-theme="dark"] .welcome-logo-dark {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: brightness(1.2) saturate(1.4) drop-shadow(0 0 16px rgba(16,185,129,0.6));
    animation: none;
}

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

/* Dark mode is controlled manually via [data-theme="dark"] only */

/* Modern loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    border-top-color: #10b981;
    animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced notification styles */
.notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: white;
    padding: 16px 32px;
    border-radius: 25px;
    box-shadow: 0 10px 30px var(--shadow-primary);
    z-index: 1000;
    font-weight: bold;
    animation: slideDown 0.3s ease, fadeOut 0.3s ease 1.7s forwards;
    backdrop-filter: blur(10px);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Modern button styles */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

/* ── Modal Action Buttons ── */
.modal-btn {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    transition: transform 0.3s ease;
}

.modal-btn-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-btn:hover::after {
    opacity: 1;
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.modal-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Previous button (green) */
.modal-btn-prev .modal-btn-bg {
    background: linear-gradient(135deg, #10b981, #059669);
}
.modal-btn-prev:hover .modal-btn-bg {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Complete button (purple) */
.modal-btn-complete .modal-btn-bg {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.modal-btn-complete:hover .modal-btn-bg {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}
.modal-btn-complete:hover .modal-btn-content {
    transform: scale(1.05);
}

/* Next button (green) */
.modal-btn-next .modal-btn-bg {
    background: linear-gradient(135deg, #10b981, #059669);
}
.modal-btn-next:hover .modal-btn-bg {
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
}

/* Theme toggle button - modern pill switch */
.theme-toggle-btn {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    cursor: pointer;
    padding: 8px 18px 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: white;
}

.theme-toggle-btn:hover {
    background: rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.theme-toggle-track {
    display: flex;
    align-items: center;
    width: 54px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 3px;
    backdrop-filter: blur(8px);
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
    box-sizing: border-box;
    direction: ltr;
    flex-shrink: 0;
}

.theme-toggle-thumb {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
}

.theme-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
}

.theme-icon-dark,
.theme-icon-light {
    position: absolute;
    font-size: 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon-dark { color: #6366f1; opacity: 1; transform: scale(1); }
.theme-icon-light { color: #f59e0b; opacity: 0; transform: scale(0.5); }

[data-theme="dark"] .theme-toggle-track {
    background: rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.6);
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(24px);
    background: #1e1b4b;
}

[data-theme="dark"] .theme-icon-dark { opacity: 0; transform: scale(0.5); }
[data-theme="dark"] .theme-icon-light { opacity: 1; transform: scale(1); color: #fbbf24; }

.theme-toggle-btn:hover .theme-toggle-track {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.3);
}

/* Theme toggle animation */
#themeToggle {
    transition: all 0.3s ease;
}

#themeToggle:hover {
    transform: scale(1.1);
}

#themeToggle:active {
    transform: scale(0.95);
}

/* Dark mode specific styles */
[data-theme="dark"] .quiz-option:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

[data-theme="dark"] .quiz-option.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

[data-theme="dark"] .quiz-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Modern card hover effects */
.modern-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.modern-card:hover {
    transform: translateY(-5px) rotateX(5deg);
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Image styling and fallbacks */
.step-image {
    transition: all 0.3s ease;
}

.step-image.fallback-image {
    opacity: 0.8;
    filter: brightness(0.95);
}

.step-card:hover .step-image {
    transform: scale(1.05);
}

/* Better image loading states */
.step-image {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

/* Image overlay enhancement */
.step-card .relative::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

.step-card .step-number {
    z-index: 2;
}

/* Modern Footer Styles */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: footerGlow 8s ease-in-out infinite;
}

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

footer .footer-content {
    position: relative;
    z-index: 1;
}

footer .footer-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

footer:hover .footer-icon {
    transform: scale(1.1) rotate(5deg);
}

footer .footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E") no-repeat;
    background-size: cover;
    transform: translateY(-1px);
}

footer .social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

footer .social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

footer .social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

footer .social-link:hover::before {
    opacity: 1;
}

footer .social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

footer .social-link:hover i {
    transform: scale(1.2) rotate(5deg);
}

footer .social-link i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

/* Individual icon colors on hover */
footer .social-link:nth-child(1):hover {
    background: linear-gradient(135deg, #333, #24292e);
    border-color: #24292e;
}

footer .social-link:nth-child(2):hover {
    background: linear-gradient(135deg, #0077b5, #005582);
    border-color: #0077b5;
}

footer .social-link:nth-child(3):hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    border-color: #0088cc;
}

footer .social-link:nth-child(4):hover {
    background: linear-gradient(135deg, #e4405f, #c13584);
    border-color: #e4405f;
}

footer .social-link:nth-child(5):hover {
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-color: #25d366;
}

footer .social-link:active {
    transform: translateY(-2px) scale(1.05);
}

/* Modern Footer Quick Links */
footer .quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer .quick-links li {
    margin-bottom: 0.5rem;
    transform-origin: right center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer .quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #d1fae5;
}

footer .quick-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.75rem;
}

footer .quick-links a::after {
    content: '←';
    position: absolute;
    right: 1rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
}

footer .quick-links a:hover {
    color: #ffffff;
    padding-right: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(-5px);
}

footer .quick-links a:hover::before {
    width: 100%;
}

footer .quick-links a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

footer .quick-links li:hover {
    transform: scale(1.05);
}

footer .quick-links a:active {
    transform: translateX(-3px) scale(0.98);
}

/* Modern Email Contact Styling */
footer .email-contact {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

footer .email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

footer .email-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

footer .email-link:hover::before {
    opacity: 1;
}

footer .email-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

footer .email-link i {
    font-size: 1.25rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

footer .email-link:hover i {
    transform: scale(1.2) rotate(-10deg);
}

footer .email-link span {
    position: relative;
    z-index: 1;
}

footer .email-link:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    footer .email-link {
        font-size: 0.75rem;
        padding: 0.65rem 1.25rem;
    }
    
    footer .email-link span {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
/* Fix image display issues */
.step-image {
    object-fit: contain !important;
    background-color: #f3f4f6 !important;
    width: 100% !important;
    height: 200px !important;
}

.modal img {
    object-fit: contain !important;
    background-color: #f3f4f6 !important;
    max-height: 70vh !important;
    width: 100% !important;
    height: auto !important;
}

/* Ensure modal is properly sized */
.modal .w-full.max-w-4xl {
    max-height: 90vh;
    overflow-y: auto;
}

/* Better image container */
.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f3f4f6;
    border-radius: 1rem;
}

/* Animated Background Canvas */
#animatedBg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Beautiful gradient background behind the canvas */
    background: linear-gradient(135deg, 
        #e8f5e9 0%,    /* Soft green */
        #f0f4ff 25%,   /* Light blue */
        #fef3c7 50%,   /* Warm gold */
        #f8f3e8 75%,   /* Soft beige */
        #e8f5e9 100%   /* Back to soft green */
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

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

/* Dark mode modal image */
[data-theme="dark"] .modal img {
    background-color: #1f2937 !important;
    filter: brightness(0.8) contrast(1.05);
}

[data-theme="dark"] .image-container {
    background-color: #1f2937 !important;
}

/* ── About Header Button ── */
.about-header-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    color: white;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.about-header-btn:hover {
    background: rgba(0,0,0,0.38);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.about-header-btn:hover .about-header-arrow {
    transform: translateX(3px);
}

.about-header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    border: 2px solid rgba(255,255,255,0.6);
    flex-shrink: 0;
}

.about-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1;
}

.about-header-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: white;
}

.about-header-sub {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.02em;
}

.about-header-arrow {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* ── About Modal ── */
.about-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.about-modal.active {
    display: flex;
}

.about-modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    overflow: hidden;
    background: white;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: slideInUp 0.4s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="dark"] .about-modal-card {
    background: #1f2937;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.about-modal-bar {
    height: 5px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #10b981);
    background-size: 200% 100%;
    animation: gradientShift 3s linear infinite;
}

.about-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 10;
}

.about-modal-close:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    transform: rotate(90deg);
}

[data-theme="dark"] .about-modal-close {
    background: rgba(255,255,255,0.08);
    color: #9ca3af;
}

.about-modal-body {
    padding: 28px 28px 32px;
}

.about-modal-photo-wrap {
    position: relative;
    width: 110px;
    height: 110px;
}

.about-modal-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 30px rgba(16,185,129,0.35);
    position: relative;
    z-index: 2;
}

.about-modal-photo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #3b82f6, #8b5cf6);
    z-index: 1;
    animation: spin 6s linear infinite;
    opacity: 0.7;
}

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

.about-modal-name {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.about-modal-role {
    font-size: 0.82rem;
    font-weight: 600;
    color: #10b981;
    letter-spacing: 0.05em;
}

.about-modal-bio {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    text-align: left;
    direction: ltr;
}

[data-theme="dark"] .about-modal-bio {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.about-modal-bio p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4b5563;
    text-align: left;
}

[data-theme="dark"] .about-modal-bio p {
    color: #d1d5db;
}

.about-modal-bio strong {
    color: #10b981;
    font-weight: 700;
}

.about-modal-skills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.about-modal-skill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(59,130,246,0.12));
    color: #059669;
    border: 1.5px solid rgba(16,185,129,0.25);
    transition: all 0.2s ease;
}

.about-modal-skill:hover {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

[data-theme="dark"] .about-modal-skill {
    color: #34d399;
    border-color: rgba(52,211,153,0.25);
}

.about-modal-socials {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.about-modal-social {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
}

.about-modal-social:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.about-modal-social.github   { background: #24292e; }
.about-modal-social.linkedin { background: #0077b5; }
.about-modal-social.telegram { background: #0088cc; }
.about-modal-social.email    { background: linear-gradient(135deg,#10b981,#059669); }

.about-modal-social.github:hover   { box-shadow: 0 8px 20px rgba(36,41,46,0.5); }
.about-modal-social.linkedin:hover { box-shadow: 0 8px 20px rgba(0,119,181,0.5); }
.about-modal-social.telegram:hover { box-shadow: 0 8px 20px rgba(0,136,204,0.5); }
.about-modal-social.email:hover    { box-shadow: 0 8px 20px rgba(16,185,129,0.5); }

/* ── About Modal Portfolio Link ── */
.about-modal-portfolio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(59,130,246,0.08));
    border: 1.5px solid rgba(16,185,129,0.25);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    direction: ltr;
}

.about-modal-portfolio:hover {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16,185,129,0.35);
}

.about-modal-portfolio:hover .about-modal-portfolio-label,
.about-modal-portfolio:hover .about-modal-portfolio-desc,
.about-modal-portfolio:hover .about-modal-portfolio-icon,
.about-modal-portfolio:hover .about-modal-portfolio-arrow {
    color: white !important;
}

.about-modal-portfolio-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.about-modal-portfolio:hover .about-modal-portfolio-icon {
    background: rgba(255,255,255,0.25);
}

.about-modal-portfolio-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.about-modal-portfolio-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #10b981;
    transition: color 0.3s ease;
}

.about-modal-portfolio-desc {
    font-size: 0.75rem;
    color: #6b7280;
    transition: color 0.3s ease;
}

[data-theme="dark"] .about-modal-portfolio-desc {
    color: #9ca3af;
}

.about-modal-portfolio-arrow {
    color: #10b981;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.about-modal-portfolio:hover .about-modal-portfolio-arrow {
    transform: translateX(4px);
}

[data-theme="dark"] .about-modal-portfolio {
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.2);
}

/* ══════════════════════════════════════
   About Modal — Full Page Two-Panel (Modernized)
══════════════════════════════════════ */
.about-modal-card {
    position: relative;
    width: 95vw;
    max-width: 960px;
    max-height: 92vh;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    animation: slideInUp 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Left panel */
.about-panel-left {
    width: 300px;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(160deg, #022c22 0%, #064e3b 35%, #065f46 70%, #047857 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    overflow: hidden;
}

/* Decorative glow blobs */
.about-panel-left::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.about-panel-left::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.about-panel-bg {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.about-panel-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

/* Photo — larger, face-focused */
.about-panel-left .about-modal-photo-wrap {
    width: 140px;
    height: 140px;
}

.about-panel-left .about-modal-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    object-position: center 15%;
    border: 3px solid rgba(255,255,255,0.25);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 6px rgba(16,185,129,0.2);
}

.about-modal-photo-ring {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background: conic-gradient(#10b981, #3b82f6, #8b5cf6, #10b981);
    z-index: 1;
    animation: spin 5s linear infinite;
    opacity: 0.6;
}

.about-panel-left .about-modal-name {
    font-size: 1.35rem;
    color: white;
    -webkit-text-fill-color: white;
    background: none;
    margin-bottom: 6px;
    line-height: 1.3;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.about-panel-left .about-modal-role {
    color: #6ee7b7;
    font-size: 0.88rem;
    margin-bottom: 0;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.about-panel-divider {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    margin: 22px auto;
    border-radius: 2px;
}

.about-panel-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 4px;
}

.about-panel-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 12px 8px;
    border-right: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s ease;
}

.about-panel-stat:last-child { border-right: none; }

.about-panel-stat:hover {
    background: rgba(255,255,255,0.1);
}

.about-panel-stat-n {
    font-size: 1.35rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.about-panel-stat-l {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.55);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Social icons in left panel */
.about-panel-left .about-modal-socials {
    justify-content: center;
    gap: 10px;
}

.about-panel-left .about-modal-social {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 1.15rem;
    backdrop-filter: blur(4px);
}

.about-panel-left .about-modal-social:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Right panel */
.about-panel-right {
    flex: 1;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .about-panel-right {
    background: #111827;
}

.about-panel-right-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 40px 36px 36px;
}

.about-panel-right-scroll::-webkit-scrollbar { width: 5px; }
.about-panel-right-scroll::-webkit-scrollbar-track { background: transparent; }
.about-panel-right-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
[data-theme="dark"] .about-panel-right-scroll::-webkit-scrollbar-thumb { background: #374151; }

/* Section titles */
.about-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #10b981;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.about-section-title i {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Bio block */
.about-modal-bio {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px;
    background: #f8fafc;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    text-align: left;
    direction: ltr;
    margin-bottom: 0;
}

[data-theme="dark"] .about-modal-bio {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.07);
}

.about-modal-bio p {
    font-size: 1rem;
    line-height: 1.85;
    color: #475569;
    text-align: left;
}

[data-theme="dark"] .about-modal-bio p { color: #cbd5e1; }
.about-modal-bio strong { color: #10b981; font-weight: 700; }

/* Skills grid */
.about-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 0;
}

.about-skill-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    cursor: default;
}

.about-skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(16,185,129,0.15);
    border-color: #10b981;
    background: #f0fdf4;
    color: #065f46;
}

.about-skill-item i { font-size: 1.2rem; }

[data-theme="dark"] .about-skill-item {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: #e2e8f0;
}

[data-theme="dark"] .about-skill-item:hover {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.4);
    color: #6ee7b7;
}

/* Close button */
.about-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: all 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.about-modal-close:hover {
    background: rgba(239,68,68,0.85);
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 14px rgba(239,68,68,0.4);
}

/* Portfolio link */
.about-modal-portfolio {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(16,185,129,0.07), rgba(59,130,246,0.07));
    border: 1.5px solid rgba(16,185,129,0.2);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    direction: ltr;
}

.about-modal-portfolio:hover {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16,185,129,0.4);
}

.about-modal-portfolio-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #10b981;
    transition: color 0.3s ease;
}

.about-modal-portfolio-desc {
    font-size: 0.8rem;
    color: #64748b;
    transition: color 0.3s ease;
}

[data-theme="dark"] .about-modal-portfolio-desc { color: #94a3b8; }

[data-theme="dark"] .about-modal-portfolio {
    background: rgba(16,185,129,0.07);
    border-color: rgba(16,185,129,0.18);
}

/* Responsive — stack on mobile */
@media (max-width: 640px) {
    .about-modal-card {
        flex-direction: column;
        max-height: 95vh;
        width: 96vw;
    }
    .about-panel-left {
        width: 100%;
        padding: 32px 20px 24px;
    }
    .about-panel-left-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .about-panel-left .about-modal-photo-wrap {
        width: 100px;
        height: 100px;
    }
    .about-panel-left .about-modal-photo {
        width: 100px;
        height: 100px;
        object-position: center 15%;
    }
    .about-panel-right-scroll {
        padding: 24px 20px;
    }
    .about-skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── About Website Button ── */
.about-website-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    color: white;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    backdrop-filter: blur(10px);
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.about-website-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-website-btn:hover::before { opacity: 1; }

.about-website-btn:hover {
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.2);
}

.about-website-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: #059669;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.about-website-btn:hover .about-website-btn-icon {
    background: white;
    transform: rotate(20deg) scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.about-website-btn-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.about-website-btn:hover .about-website-btn-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

.about-website-btn:hover {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ── About Website Modal ── */
.about-website-card {
    position: relative;
    width: 95vw;
    max-width: 580px;
    max-height: 90vh;
    border-radius: 28px;
    overflow: hidden;
    background: white;
    box-shadow: 0 40px 100px rgba(0,0,0,0.4);
    animation: slideInUp 0.4s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .about-website-card {
    background: #111827;
}

.about-website-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 20px;
    background: linear-gradient(135deg, #064e3b, #065f46, #047857);
    position: relative;
}

.about-website-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.about-website-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.about-website-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.about-website-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-top: 3px;
    position: relative;
    z-index: 1;
}

.about-website-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    flex: 1;
}

.about-website-body::-webkit-scrollbar { width: 4px; }
.about-website-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* Stats */
.about-website-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.about-website-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.about-website-stat:hover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: translateY(-2px);
}

[data-theme="dark"] .about-website-stat {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.about-website-stat i {
    font-size: 1.1rem;
    color: #10b981;
}

.about-website-stat-n {
    font-size: 1.1rem;
    font-weight: 800;
    color: #065f46;
    line-height: 1;
}

[data-theme="dark"] .about-website-stat-n { color: #34d399; }

.about-website-stat-l {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

[data-theme="dark"] .about-website-stat-l { color: #94a3b8; }

/* Description */
.about-website-desc {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
    direction: ltr;
}

[data-theme="dark"] .about-website-desc {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.07);
}

.about-website-desc p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: #475569;
}

[data-theme="dark"] .about-website-desc p { color: #cbd5e1; }
.about-website-desc strong { color: #10b981; font-weight: 700; }

/* Features */
.about-website-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.about-website-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.82rem;
    color: #334155;
    transition: all 0.2s ease;
}

.about-website-feature:hover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: translateX(3px);
}

[data-theme="dark"] .about-website-feature {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.07);
    color: #e2e8f0;
}

.about-website-feature i { font-size: 1rem; flex-shrink: 0; }

/* Built by */
.about-website-built {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(59,130,246,0.08));
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 14px;
    font-size: 0.85rem;
    color: #475569;
    flex-wrap: wrap;
}

[data-theme="dark"] .about-website-built {
    background: rgba(16,185,129,0.07);
    border-color: rgba(16,185,129,0.18);
    color: #94a3b8;
}

.about-website-built i { font-size: 1.2rem; }
.about-website-built strong { color: #10b981; font-weight: 700; }

@media (max-width: 480px) {
    .about-website-stats { grid-template-columns: repeat(2, 1fr); }
    .about-website-features { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE FIXES
══════════════════════════════════════ */

/* ── Base: all small phones (≤ 480px) ── */
@media (max-width: 480px) {

    /* Header */
    header.hero-pattern {
        padding: 14px 0 12px;
    }

    header .max-w-4xl {
        padding: 0 12px;
    }

    header h1 {
        font-size: 1.2rem !important;
    }

    header p.text-sm {
        font-size: 0.72rem !important;
    }

    /* Theme toggle — smaller on tiny screens */
    .theme-toggle-btn {
        padding: 5px 10px 5px 7px;
        gap: 6px;
    }

    .theme-toggle-track {
        width: 40px;
        height: 22px;
    }

    .theme-toggle-thumb {
        width: 16px;
        height: 16px;
    }

    .theme-toggle-label {
        font-size: 0.72rem;
    }

    [data-theme="dark"] .theme-toggle-thumb {
        transform: translateX(18px);
    }

    /* About Me header button */
    .about-header-btn {
        padding: 4px 10px 4px 4px;
        gap: 6px;
    }

    .about-header-avatar {
        width: 28px;
        height: 28px;
    }

    .about-header-label {
        font-size: 0.72rem;
    }

    .about-header-sub {
        display: none;
    }

    /* Welcome section */
    .welcome-logo-img {
        width: 140px;
        height: 140px;
    }

    #welcome-title {
        font-size: 1.3rem !important;
    }

    .glass-effect p.text-base {
        font-size: 0.88rem !important;
    }

    /* Buttons in welcome */
    .glass-effect button,
    .glass-effect a {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }

    /* Tabs */
    .tab-btn {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }

    .tab-btn i {
        display: none;
    }

    /* Step cards */
    .step-card .p-6 {
        padding: 14px !important;
    }

    .step-card h3 {
        font-size: 1rem !important;
    }

    /* Modal */
    .modal .p-8 {
        padding: 16px !important;
    }

    #modalTitle {
        font-size: 1.1rem !important;
    }

    .modal-btn {
        padding: 10px 18px !important;
        font-size: 13px !important;
    }

    /* Progress bar */
    .progress-label span,
    .restart-btn span {
        font-size: 0.75rem;
    }

    /* Footer */
    footer .grid {
        gap: 20px !important;
    }

    .about-website-btn {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    /* About Me modal */
    .about-panel-right-scroll {
        padding: 16px !important;
    }

    .about-modal-bio p {
        font-size: 0.88rem !important;
    }

    .about-skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .about-skill-item {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }

    /* About website modal */
    .about-website-card {
        width: 98vw;
        border-radius: 20px;
    }

    .about-website-header {
        padding: 18px 18px 16px;
        gap: 12px;
    }

    .about-website-logo {
        width: 48px;
        height: 48px;
    }

    .about-website-title {
        font-size: 1.05rem;
    }

    .about-website-body {
        padding: 16px 16px 20px;
    }

    .about-website-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .about-website-features {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ── Small phones (481px – 640px) ── */
@media (min-width: 481px) and (max-width: 640px) {

    header h1 { font-size: 1.4rem !important; }

    .welcome-logo-img {
        width: 160px;
        height: 160px;
    }

    .tab-btn {
        padding: 9px 16px !important;
        font-size: 0.85rem !important;
    }

    .about-skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── All phones (≤ 640px) shared ── */
@media (max-width: 640px) {

    /* Header layout — stack toggle and about btn properly */
    header.hero-pattern {
        position: relative;
        padding-top: 56px;
        padding-bottom: 16px;
    }

    #themeToggle {
        top: 10px !important;
        left: 10px !important;
    }

    button.about-header-btn {
        top: 10px !important;
        right: 10px !important;
    }

    /* Welcome section padding */
    .glass-effect.rounded-2xl {
        padding: 20px 16px !important;
    }

    /* Tab nav wrapping */
    nav .flex.flex-wrap {
        gap: 8px !important;
        padding: 8px !important;
    }

    /* Step cards — single column already via Tailwind, just fix padding */
    #stepsContainer {
        gap: 16px !important;
    }

    /* Modal full width */
    .modal .w-full {
        margin: 8px !important;
    }

    .modal .rounded-3xl {
        border-radius: 16px !important;
    }

    /* Modal image */
    #modalImage {
        max-height: 260px !important;
    }

    /* Modal buttons row */
    .modal .flex.gap-4 {
        gap: 8px !important;
    }

    /* Progress container */
    .progress-container .max-w-6xl {
        padding: 12px 16px !important;
    }

    /* Footer grid — single column */
    footer .grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    footer .text-center.md\:text-right {
        text-align: center !important;
    }

    /* About Me modal — full screen on mobile */
    .about-modal-card {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }

    /* Fix: photo and close button getting cut off at top */
    .about-panel-left {
        padding: 60px 16px 24px !important;
    }

    .about-modal-close {
        top: 16px !important;
        right: 16px !important;
        position: fixed !important;
        z-index: 100 !important;
    }

    .about-panel-left .about-modal-photo-wrap {
        width: 90px !important;
        height: 90px !important;
    }

    .about-panel-left .about-modal-photo {
        width: 90px !important;
        height: 90px !important;
    }

    .about-panel-stat-n { font-size: 1rem !important; }
    .about-panel-stat-l { font-size: 0.6rem !important; }

    .about-modal-social {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.95rem !important;
    }
}

/* ── Tablets (641px – 768px) ── */
@media (min-width: 641px) and (max-width: 768px) {

    .about-modal-card {
        flex-direction: column;
        max-height: 95vh;
    }

    .about-panel-left {
        width: 100% !important;
        padding: 28px 24px 20px !important;
    }

    .about-panel-left-content {
        flex-direction: row !important;
        gap: 20px;
        text-align: left !important;
    }

    .about-panel-divider { display: none; }

    .about-skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* Dark mode animated background */
[data-theme="dark"] #animatedBg {
    background: linear-gradient(135deg, 
        #0f172a 0%,    /* Deep navy */
        #1e293b 25%,   /* Dark slate */
        #111827 50%,   /* Dark gray */
        #1f2937 75%,   /* Charcoal */
        #0f172a 100%   /* Back to deep navy */
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

/* Ensure canvas is always behind content */
#animatedBg {
    z-index: -1 !important;
}

/* Make sure all content is above the canvas */
header, main, footer, nav {
    position: relative;
    z-index: 10;
}
