/* 
Developer: Mohammed Al-Baqer
 * Website: https://wsl-iq.github.io/teaafi/
 * Copyright (c) 2026 Mohammed Al-Baqer
    * Folder : CSS
    * File   : components.css
    * Type: CSS
*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-on-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-danger {
    background: var(--accent-red);
    color: var(--text-on-primary);
}

.btn-success {
    background: var(--accent-green);
    color: var(--text-on-primary);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    min-height: 36px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/*  Cards  */
.card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card:active {
    transform: scale(0.98);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.card-description {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/*  Counter Card  */
.counter-card {
    background: var(--primary-gradient);
    color: var(--text-on-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.counter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.counter-value {
    font-size: 56px;
    font-weight: 800;
    margin: var(--space-4) 0;
    position: relative;
    z-index: 1;
}

.counter-stats {
    display: flex;
    justify-content: space-around;
    margin-top: var(--space-6);
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
}

.stat-label {
    font-size: var(--text-xs);
    opacity: 0.9;
    margin-top: var(--space-1);
}

/*  Input Fields  */
.form-group {
    margin-bottom: var(--space-5);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: var(--space-4);
    color: var(--text-tertiary);
    font-size: var(--text-lg);
    transition: color var(--transition-fast);
    z-index: 1;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: var(--space-4) var(--space-12) var(--space-4) var(--space-4);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-family: var(--font-primary);
    background: var(--surface);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    min-height: 56px;
}

.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(13, 107, 110, 0.1);
}

.form-input::placeholder {
    color: var(--text-disabled);
}

/*  Gender Selector  */
.gender-selector {
    display: flex;
    gap: var(--space-4);
}

.gender-option {
    flex: 1;
    padding: var(--space-8) var(--space-4);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    background: var(--surface);
}

.gender-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.gender-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(13, 107, 110, 0.1);
}

.gender-icon {
    font-size: 48px;
    margin-bottom: var(--space-3);
    display: block;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.gender-option.selected .gender-icon {
    color: var(--primary);
}

.gender-label {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

/*  Progress Steps  */
.welcome-progress {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-10);
}

.progress-step {
    width: 40px;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--border-light);
    transition: all var(--transition-base);
}

.progress-step.active {
    background: var(--primary);
    width: 60px;
}

.progress-step.completed {
    background: var(--accent-green);
}

/*  Bottom Navigation  */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: var(--space-2) var(--space-1);
    padding-bottom: calc(var(--space-2) + var(--safe-bottom));
    box-shadow: 0 -1px 0 var(--border-light), var(--shadow-lg);
    z-index: var(--z-bottom-nav);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    font-weight: 500;
    min-width: 60px;
    position: relative;
    background: none;
    border: none;
}

.nav-item i {
    font-size: 22px;
    transition: all var(--transition-base);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 var(--radius-full) var(--radius-full);
}

/*  Sidebar Navigation  */
.sidebar {
    display: none;
    flex-direction: column;
    width: 280px;
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    background: var(--surface);
    border-left: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    z-index: var(--z-sidebar);
    padding: var(--space-6);
}

.sidebar-header {
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-6);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary);
}

.sidebar-logo i {
    font-size: 28px;
}

.sidebar-nav {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--text-base);
    cursor: pointer;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--surface-variant);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-link i {
    width: 24px;
    text-align: center;
    font-size: var(--text-lg);
}

.sidebar-footer {
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
}

/*  Splash Screen  */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-splash);
    transition: opacity 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
}

.splash-icon-wrapper {
    margin-bottom: var(--space-6);
}

.splash-icon {
    font-size: 80px;
    color: white;
    animation: splashPulse 2s infinite;
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.splash-text {
    color: white;
    margin-bottom: var(--space-8);
}

.splash-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: var(--space-2);
}

.splash-subtitle {
    font-size: var(--text-lg);
    opacity: 0.9;
}

.splash-loader {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    margin: 0 auto;
    overflow: hidden;
}

.loader-bar {
    width: 40%;
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    animation: loaderSlide 1.5s infinite ease;
}

@keyframes loaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/*  Welcome Screen  */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface);
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.welcome-screen.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.welcome-container {
    max-width: 450px;
    width: 90%;
    padding: var(--space-6);
}

.welcome-slides {
    position: relative;
}

.welcome-slide {
    display: none;
    text-align: center;
    animation: fadeSlideIn 0.4s ease;
}

.welcome-slide.active {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: var(--space-6);
}

.slide-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.slide-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.slide-buttons {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.slide-buttons .btn {
    flex: 1;
}

/*  Modal  */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-6);
}

.modal-container {
    background: var(--surface);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalIn var(--transition-base) ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
    font-size: 56px;
    color: var(--primary);
    margin-bottom: var(--space-4);
}

.modal-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-6);
}

.modal-actions {
    display: flex;
    gap: var(--space-3);
}

.modal-actions .btn {
    flex: 1;
}

/*  Content Sections  */
.content-section {
    margin-bottom: var(--space-8);
}

.section-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--primary);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--primary-light);
}

.subsection {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-3);
    border-right: 4px solid var(--primary);
}

/*  Spiritual Cards  */
.spiritual-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}

.spiritual-card h2 { color: white; }

.dhikr-text {
    font-family: var(--font-quran);
    font-size: var(--text-lg);
    line-height: 2.2;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    border-right: 4px solid var(--primary);
}

/*  Settings  */
.settings-group {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:active {
    background: var(--surface-variant);
}

/*  Toggle Switch  */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: var(--transition-base);
    border-radius: var(--radius-full);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/*  Toast  */
.toast-container {
    position: fixed;
    bottom: calc(80px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}

.toast {
    background: var(--text-primary);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn var(--transition-base) ease;
    pointer-events: auto;
    white-space: nowrap;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/*  App Container  */
.app-container {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-container.visible {
    display: flex;
}

.main-content {
    flex: 1;
    padding: var(--space-4);
    padding-bottom: calc(80px + var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/*  Dark Theme Overrides  */

.theme-dark .card,
.theme-dark .settings-group,
.theme-dark .subsection,
.theme-dark .modal-container,
.theme-dark .welcome-container,
.theme-dark .adhkar-card,
.theme-dark .dua-card,
.theme-dark .tips-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

.theme-dark .card-title,
.theme-dark .card-description,
.theme-dark .section-title,
.theme-dark .slide-title,
.theme-dark .slide-description,
.theme-dark .modal-title,
.theme-dark .modal-description,
.theme-dark .settings-item span,
.theme-dark .gender-label,
.theme-dark .nav-link span,
.theme-dark .stat-label,
.theme-dark .counter-card p,
.theme-dark .counter-card h3 {
    color: var(--text-primary) !important;
}

.theme-dark .text-secondary,
.theme-dark .card-description,
.theme-dark .slide-description,
.theme-dark .modal-description,
.theme-dark .settings-item p,
.theme-dark .adhkar-source,
.theme-dark .dua-source,
.theme-dark .verse-source {
    color: var(--text-secondary) !important;
}

.theme-dark .text-tertiary,
.theme-dark .settings-footer,
.theme-dark .sidebar-footer p {
    color: var(--text-tertiary) !important;
}

.theme-dark .spiritual-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.theme-dark .spiritual-card h2,
.theme-dark .spiritual-card h3,
.theme-dark .spiritual-card p,
.theme-dark .spiritual-card small {
    color: white !important;
}

.theme-dark .card[style*="background: #FFF8E1"] {
    background: #3E2723 !important;
    border-right-color: #FF9800 !important;
}

.theme-dark .card[style*="background: #FFF8E1"] p {
    color: #E0E0E0 !important;
}

.theme-dark .card[style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
    border-color: #2E5C2E !important;
}

.theme-dark .card[style*="background: #E8F5E9"] h3 {
    color: #66BB6A !important;
}

.theme-dark .card[style*="background: #E8F5E9"] li {
    color: #E0E0E0 !important;
}

.theme-dark .bottom-nav {
    background: rgba(30, 30, 30, 0.95) !important;
    border-top-color: var(--border) !important;
}

.theme-dark .nav-item {
    color: var(--text-tertiary) !important;
}

.theme-dark .nav-item.active {
    color: var(--primary) !important;
}

.theme-dark .sidebar {
    background: var(--surface) !important;
    border-left-color: var(--border) !important;
}

.theme-dark .sidebar-header {
    border-bottom-color: var(--border) !important;
}

.theme-dark .sidebar-footer {
    border-top-color: var(--border) !important;
}

.theme-dark .nav-link {
    color: var(--text-secondary) !important;
}

.theme-dark .nav-link:hover {
    background: var(--surface-variant) !important;
    color: var(--text-primary) !important;
}

.theme-dark .nav-link.active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.theme-dark .modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

.theme-dark .modal-container {
    background: var(--surface) !important;
}

.theme-dark .welcome-screen {
    background: var(--surface) !important;
}

.theme-dark .welcome-slide {
    background: var(--surface) !important;
}

.theme-dark .form-input {
    background: var(--surface-variant) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

.theme-dark .form-input::placeholder {
    color: var(--text-disabled) !important;
}

.theme-dark .form-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(13, 107, 110, 0.2) !important;
}

.theme-dark .input-icon {
    color: var(--text-tertiary) !important;
}

.theme-dark .gender-option {
    background: var(--surface-variant) !important;
    border-color: var(--border) !important;
}

.theme-dark .gender-option .gender-icon {
    color: var(--text-tertiary) !important;
}

.theme-dark .gender-option .gender-label {
    color: var(--text-primary) !important;
}

.theme-dark .gender-option:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}

.theme-dark .gender-option.selected {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}

.theme-dark .gender-option.selected .gender-icon {
    color: var(--primary) !important;
}

.theme-dark .progress-step {
    background: var(--border) !important;
}

.theme-dark .progress-step.active {
    background: var(--primary) !important;
}

.theme-dark .subsection {
    background: var(--surface) !important;
    border-right-color: var(--primary) !important;
}

.theme-dark .subsection p {
    color: var(--text-primary) !important;
}

.theme-dark .subsection h3 {
    color: var(--text-primary) !important;
}

.theme-dark .section-title {
    color: var(--primary) !important;
    border-bottom-color: var(--primary-light) !important;
}

.theme-dark .heading-underline::after {
    background: var(--primary-gradient) !important;
}

.theme-dark .settings-item {
    border-bottom-color: var(--border) !important;
}

.theme-dark .settings-item:hover {
    background: var(--surface-variant) !important;
}

.theme-dark .settings-group h3 {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border) !important;
}

.theme-dark .settings-group h3[style*="color: var(--accent-red)"] {
    color: #EF5350 !important;
    border-bottom-color: #3D2020 !important;
}

.theme-dark .settings-group[style*="margin-top: 24px"] {
    border-color: #3D2020 !important;
}

.theme-dark .settings-group[style*="margin-top: 24px"] h3 {
    border-bottom-color: #3D2020 !important;
}

.theme-dark .dhikr-text {
    background: var(--surface-variant) !important;
    color: var(--text-primary) !important;
    border-right-color: var(--primary) !important;
}

.theme-dark .font-quran {
    color: var(--text-primary) !important;
}

.theme-dark .counter-card {
    color: white !important;
}

.theme-dark .counter-card h3,
.theme-dark .counter-card p,
.theme-dark .counter-card .stat-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.theme-dark .counter-card .stat-value {
    color: white !important;
}

.theme-dark .counter-card .btn[style*="background: white"] {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-dark) !important;
}

.theme-dark .counter-card .btn[style*="background: rgba(255,255,255,0.2)"] {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
}

/*Fixing bugs Icons Card*/
.theme-dark .card-icon {
    color: white !important;
}

/* Fixing bugs toast */
.theme-dark .toast {
    background: #333333 !important;
    color: white !important;
}

/* Fixing Bugs toggle switch */
.theme-dark .toggle-slider {
    background-color: var(--border) !important;
}

.theme-dark input:checked + .toggle-slider {
    background-color: var(--primary) !important;
}

/* Fixing Bugs URL Link Move*/
.theme-dark .nav-item.active::before {
    background: var(--primary) !important;
}

/* Fixing Bugs Icons chacking*/
.theme-dark .fa-check-circle {
    color: var(--primary) !important;
}

/* Fixing Bugs Loading bar*/
.theme-dark .splash-loader {
    background: rgba(255, 255, 255, 0.2) !important;
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark h5,
.theme-dark h6 {
    color: var(--text-primary) !important;
}

.theme-dark p {
    color: var(--text-primary) !important;
}

.theme-dark span {
    color: inherit !important;
}

.theme-dark body {
    background-color: var(--background) !important;
}

.theme-dark .main-content {
    background-color: var(--background) !important;
}

/* Fixing Bugs outline */
.theme-dark .btn-outline {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.theme-dark .btn-outline:hover {
    background: var(--primary-light) !important;
}

/* Fixing Bugs scrollbar */
.theme-dark .main-content::-webkit-scrollbar-track {
    background: var(--surface-variant) !important;
}

.theme-dark .main-content::-webkit-scrollbar-thumb {
    background: var(--border) !important;
}

.theme-dark .main-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary) !important;
}

/* Fixing Bugs inline style */
.theme-dark [style*="background: #FFF8E1"] {
    background: #3E2723 !important;
}

.theme-dark [style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
}

.theme-dark [style*="border: 1px solid #C8E6C9"] {
    border-color: #2E5C2E !important;
}

.theme-dark [style*="border-right: 4px solid #FF9800"] {
    border-right-color: #FF9800 !important;
}

/* Fixing Bugs color placeholder */
.theme-dark ::placeholder {
    color: var(--text-disabled) !important;
}

.theme-dark :-ms-input-placeholder {
    color: var(--text-disabled) !important;
}

.theme-dark ::-ms-input-placeholder {
    color: var(--text-disabled) !important;
}

.theme-dark ::selection {
    background: var(--primary) !important;
    color: white !important;
}

/* Fixing Bugs Bold fonts*/
.theme-dark hr {
    border-top-color: var(--border) !important;
}

.theme-dark .btn:disabled {
    opacity: 0.4 !important;
}

/*Fixing Bugs hover of cards*/
.theme-dark .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Fixing Bugs text smaill*/
.theme-dark small {
    color: var(--text-tertiary) !important;
}

.theme-dark .spiritual-card small {
    color: rgba(255, 255, 255, 0.8) !important;
}

/*  Fixing Bugs Icond Dark */

.theme-dark .card-icon[style*="background: #E0F2F1"] {
    background: #1A3A3C !important;
    color: #4DB6AC !important;
}

.theme-dark .card-icon[style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
    color: #66BB6A !important;
}

.theme-dark .card-icon[style*="background: #FCE4EC"] {
    background: #3D1F28 !important;
    color: #EF5350 !important;
}

.theme-dark .card-icon[style*="background: #E0F2F1"][style*="color: #0D6B6E"] {
    background: #1A3A3C !important;
    color: #4DB6AC !important;
}

.theme-dark .card-icon[style*="background: #FCE4EC"][style*="color: #F44336"] {
    background: #3D1F28 !important;
    color: #EF5350 !important;
}

.theme-dark .card-icon[style*="background: #FFF3E0"] {
    background: #3E2E1A !important;
    color: #FFB74D !important;
}

.theme-dark .card-icon[style*="color: #0D6B6E"] {
    color: #4DB6AC !important;
}

.theme-dark .card-icon[style*="color: #4CAF50"] {
    color: #66BB6A !important;
}

.theme-dark .card-icon[style*="color: #F44336"] {
    color: #EF5350 !important;
}

.theme-dark .card-icon[style*="color: #FF9800"] {
    color: #FFB74D !important;
}


.theme-dark .settings-group a[href*="instagram"] {
    background: linear-gradient(45deg, #F09433, #E6683C, #DC2743, #CC2366, #BC1888) !important;
    color: white !important;
}

.theme-dark .settings-group a[href*="t.me"] {
    background: linear-gradient(45deg, #1DA1F2, #0088CC) !important;
    color: white !important;
}

.theme-dark .settings-group a[href*="github"] {
    background: linear-gradient(45deg, #555555, #222222) !important;
    color: white !important;
}

.theme-dark .settings-group a[href*="instagram"] .fab,
.theme-dark .settings-group a[href*="t.me"] .fab,
.theme-dark .settings-group a[href*="github"] .fab {
    color: inherit !important;
}

.theme-dark span[style*="background: #E0F2F1"] {
    background: #1A3A3C !important;
    color: #4DB6AC !important;
}

.theme-dark span[style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
    color: #66BB6A !important;
}

.theme-dark span[style*="background: #FCE4EC"] {
    background: #3D1F28 !important;
    color: #EF5350 !important;
}

.settings-group a[href*="instagram"]:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.4) !important;
}

.settings-group a[href*="t.me"]:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.4) !important;
}

.settings-group a[href*="github"]:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.theme-dark a[href*="instagram"] .fab.fa-instagram {
    color: #E1306C !important;
}

.theme-dark a[href*="t.me"] .fab.fa-telegram {
    color: #0088CC !important;
}

.theme-dark a[href*="github"] .fab.fa-github {
    color: #000000 !important;
}

.theme-dark a[href*="instagram"] div[style*="background: white"],
.theme-dark a[href*="t.me"] div[style*="background: white"],
.theme-dark a[href*="github"] div[style*="background: white"] {
    background: white !important;
}

.theme-dark a[href*="instagram"] span,
.theme-dark a[href*="instagram"] p,
.theme-dark a[href*="t.me"] span,
.theme-dark a[href*="t.me"] p,
.theme-dark a[href*="github"] span,
.theme-dark a[href*="github"] p {
    color: white !important;
}

.theme-dark a[href*="instagram"] .fa-arrow-left,
.theme-dark a[href*="t.me"] .fa-arrow-left,
.theme-dark a[href*="github"] .fa-arrow-left {
    color: rgba(255, 255, 255, 0.8) !important;
}

.theme-dark .card-icon[style*="background: #E3F2FD"] {
    background: #1A2B3C !important;
    color: #64B5F6 !important;
}

.theme-dark .card-icon[style*="background: #FFF3E0"] {
    background: #3E2E1A !important;
    color: #FFB74D !important;
}

.theme-dark .card-icon[style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
    color: #66BB6A !important;
}

.theme-dark .card-icon[style*="background: #F3E5F5"] {
    background: #2A1A3C !important;
    color: #CE93D8 !important;
}

.theme-dark .card-icon[style*="background: #E0F2F1"] {
    background: #1A3A3C !important;
    color: #4DB6AC !important;
}

.card-icon[style*="background: #FCE4EC"],
.card-icon[style*="background:#FCE4EC"],
.card-icon[style*="background-color: #FCE4EC"],
.card-icon[style*="background-color:#FCE4EC"] {
    color: #EF5350 !important;
}

.theme-dark .card-icon[style*="background: #FCE4EC"],
.theme-dark .card-icon[style*="background:#FCE4EC"],
.theme-dark .card-icon[style*="background-color: #FCE4EC"],
.theme-dark .card-icon[style*="background-color:#FCE4EC"] {
    background: #3D1F28 !important;
    color: #EF5350 !important;
}

.theme-dark #policy-privacy .subsection h3[style*="color: #1565C0"] {
    color: #64B5F6 !important;
}

.theme-dark #policy-terms .subsection h3[style*="color: #E65100"] {
    color: #FFB74D !important;
}

.theme-dark #policy-license .subsection h3[style*="color: #2E7D32"] {
    color: #66BB6A !important;
}

.theme-dark #policy-conduct .subsection h3[style*="color: #6A1B9A"] {
    color: #CE93D8 !important;
}

.theme-dark #policy-contributing .subsection h3[style*="color: #00695C"] {
    color: #4DB6AC !important;
}

.theme-dark #policy-security .subsection h3[style*="color: #C62828"] {
    color: #EF5350 !important;
}

.theme-dark #policy-privacy .subsection {
    border-right-color: #1A3C5C !important;
}

.theme-dark #policy-terms .subsection {
    border-right-color: #3E2E1A !important;
}

.theme-dark #policy-license .subsection {
    border-right-color: #1B3A1B !important;
}

.theme-dark #policy-conduct .subsection {
    border-right-color: #2A1A3C !important;
}

.theme-dark #policy-contributing .subsection {
    border-right-color: #1A3A3C !important;
}

.theme-dark #policy-security .subsection {
    border-right-color: #3D1F28 !important;
}

.theme-dark .subsection div[style*="background: var(--surface-variant)"] {
    background: #2D2D2D !important;
    border: 1px solid #3D3D3D !important;
}

.theme-dark .subsection .fa-check-circle {
    color: #66BB6A !important;
}

.theme-dark .subsection .fa-times-circle {
    color: #EF5350 !important;
}

.theme-dark .subsection .fa-star {
    color: #FFD700 !important;
}

.theme-dark .subsection .fa-info-circle {
    color: #64B5F6 !important;
}

.theme-dark .subsection .fa-exclamation-triangle {
    color: #FFB74D !important;
}

.theme-dark .subsection .fa-shield-alt {
    color: #66BB6A !important;
}

.theme-dark .heading-underline .fa-shield-alt {
    color: var(--primary) !important;
}

.theme-dark .text-secondary.mb-6 {
    color: var(--text-secondary) !important;
}

.theme-dark [style*="box-shadow: 0 0 0 4px var(--primary-light)"] {
    box-shadow: 0 0 0 4px #1A3A3C !important;
}


* {
    font-style: normal !important;
}

/* السماح بالميلان فقط للعناصر المخصصة */
.fa,
.fas,
.far,
.fab,
.fal {
    font-style: normal !important;
}

em,
i:not(.fa):not(.fas):not(.far):not(.fab):not(.fal) {
    font-style: normal !important;
}

[lang="ar"],
[dir="rtl"] {
    font-style: normal !important;
}

.card p,
.card-description,
.subsection p,
.settings-item span {
    font-style: normal !important;
}

.font-quran {
    font-style: normal !important;
    line-height: 2.2 !important;
}

#motivational-message {
    font-style: normal !important;
    text-align: center !important;
}

.theme-dark p,
.theme-dark span,
.theme-dark li,
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4 {
    font-style: normal !important;
}

.theme-dark .modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

.theme-dark .modal-container {
    background: #1E1E1E !important;
    border: 1px solid #3D3D3D !important;
}

.theme-dark .modal-container h3 {
    color: #E0E0E0 !important;
}

.theme-dark .modal-container p {
    color: #B0B0B0 !important;
}

.theme-dark .modal-container strong {
    color: #E0E0E0 !important;
}

.theme-dark .modal-container p[style*="color: var(--text-secondary)"] {
    color: #B0B0B0 !important;
}

.theme-dark .modal-container p[style*="color: var(--text-tertiary)"] {
    color: #808080 !important;
}

.theme-dark .modal-container p[style*="direction: ltr"] {
    color: #64B5F6 !important;
    background: #1A2B3C !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
}

.theme-dark .modal-container div[style*="background: #FFF3E0"] {
    background: #3E2E1A !important;
    border: 1px solid #5D4037 !important;
}

.theme-dark .modal-container div[style*="background: #FFF3E0"] p {
    color: #FFCC80 !important;
}

.theme-dark .modal-container div[style*="background: #FFF3E0"] strong {
    color: #FFB74D !important;
}

.theme-dark .modal-container div[style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
    border: 1px solid #2E5C2E !important;
}

.theme-dark .modal-container div[style*="background: #E8F5E9"] p {
    color: #A5D6A7 !important;
}

.theme-dark .modal-container div[style*="background: #E8F5E9"] strong {
    color: #81C784 !important;
}

.theme-dark .modal-container div[style*="background: #E8F5E9"] li {
    color: #A5D6A7 !important;
}

.theme-dark .modal-container div[style*="background: #E3F2FD"] {
    background: #1A2B3C !important;
    border: 1px solid #2C4053 !important;
}

.theme-dark .modal-container div[style*="background: #E3F2FD"] p {
    color: #90CAF9 !important;
}

.theme-dark .modal-container div[style*="background: #E3F2FD"] strong {
    color: #64B5F6 !important;
}

.theme-dark .modal-container div[style*="border-radius: 50%"] {
    border: 2px solid #3D3D3D !important;
}

.theme-dark .modal-container div[style*="border-radius: 50%"][style*="background: #FFF3E0"] {
    background: #3E2E1A !important;
}

.theme-dark .modal-container div[style*="border-radius: 50%"][style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
}

.theme-dark .modal-container div[style*="border-radius: 50%"][style*="background: #E3F2FD"] {
    background: #1A2B3C !important;
}

.theme-dark .modal-container .fa-globe {
    color: #FFB74D !important;
}

.theme-dark .modal-container .fa-android {
    color: #81C784 !important;
}

.theme-dark .modal-container .fa-windows {
    color: #64B5F6 !important;
}

.theme-dark .modal-container .fa-lightbulb {
    color: #FFD54F !important;
}

.theme-dark .modal-container .fa-shield-alt {
    color: #81C784 !important;
}

.theme-dark .modal-container .fa-info-circle {
    color: #90CAF9 !important;
}

.theme-dark .modal-container .fa-link {
    color: #64B5F6 !important;
}

.theme-dark .modal-container .btn-outline {
    border-color: #4DB6AC !important;
    color: #4DB6AC !important;
}

.theme-dark .modal-container .btn-outline:hover {
    background: #1A3A3C !important;
}

.theme-dark .modal-container .btn-primary {
    background: linear-gradient(135deg, #0D6B6E, #26A69A) !important;
    color: white !important;
}

.theme-dark .settings-item div[style*="background: #FFF3E0"][style*="width: 48px"] {
    background: #3E2E1A !important;
}

.theme-dark .settings-item div[style*="background: #E8F5E9"][style*="width: 48px"] {
    background: #1B3A1B !important;
}

.theme-dark .settings-item div[style*="background: #E3F2FD"][style*="width: 48px"] {
    background: #1A2B3C !important;
}

.theme-dark .settings-item .fa-globe {
    color: #FFB74D !important;
}

.theme-dark .settings-item .fa-android {
    color: #81C784 !important;
}

.theme-dark .settings-item .fa-windows {
    color: #64B5F6 !important;
}

.theme-dark .settings-item span[style*="color: #FF9800"] {
    color: #FFB74D !important;
    background: #3E2E1A !important;
    border: 1px solid #5D4037 !important;
}

.theme-dark .settings-item span[style*="color: #4CAF50"] {
    color: #81C784 !important;
    background: #1B3A1B !important;
    border: 1px solid #2E5C2E !important;
}

.theme-dark .settings-item span[style*="color: #0078D4"] {
    color: #64B5F6 !important;
    background: #1A2B3C !important;
    border: 1px solid #2C4053 !important;
}

.theme-dark .settings-item p[style*="color: var(--text-tertiary)"] {
    color: #808080 !important;
}

.theme-dark .settings-item .fa-chevron-left {
    color: #808080 !important;
}


.theme-dark .modal-container * {
    color-scheme: dark;
}

.theme-dark .modal-container small,
.theme-dark .modal-container p[style*="font-size: 11px"],
.theme-dark .modal-container p[style*="font-size: 12px"],
.theme-dark .modal-container p[style*="font-size: 13px"] {
    color: #808080 !important;
}

.theme-dark .modal-container ul {
    color: #B0B0B0 !important;
}

.theme-dark .modal-container ul li {
    color: #B0B0B0 !important;
}

.theme-dark .modal-container ul li .fa-check {
    color: #81C784 !important;
}


@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.rating-star {
    transition: all 0.2s ease !important;
}

.rating-star:hover {
    transform: scale(1.3) !important;
}

.theme-dark #thank-you-message div[style*="background: linear-gradient(135deg, #E8F5E9, #C8E6C9)"] {
    background: linear-gradient(135deg, #1B3A1B, #2E5C2E) !important;
}

.theme-dark #thank-you-message h3 {
    color: #81C784 !important;
}

.theme-dark #thank-you-message p {
    color: #A5D6A7 !important;
}

.theme-dark #rating-text {
    color: #B0B0B0 !important;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.rating-star {
    transition: all 0.2s ease !important;
}

.rating-star:hover {
    transform: scale(1.3) !important;
}

.theme-dark #thank-you-message div[style*="background: linear-gradient(135deg, #E8F5E9, #C8E6C9)"] {
    background: linear-gradient(135deg, #1B3A1B, #2E5C2E) !important;
}

.theme-dark #thank-you-message h3 {
    color: #81C784 !important;
}

.theme-dark #thank-you-message p {
    color: #A5D6A7 !important;
}


.theme-dark .card-icon[style*="background: #FCE4EC"][style*="color: #C62828"] {
    background: #3D1F28 !important;
    color: #EF5350 !important;
}

.theme-dark .card-icon[style*="background: #F3E5F5"][style*="color: #6A1B9A"] {
    background: #2A1A3C !important;
    color: #CE93D8 !important;
}

.theme-dark .card-icon[style*="background: #FFF3E0"][style*="color: #E65100"] {
    background: #3E2E1A !important;
    color: #FFB74D !important;
}

.theme-dark .card-icon[style*="background: #EFEBE9"][style*="color: #795548"] {
    background: #3E2E2A !important;
    color: #BCAAA4 !important;
}

.theme-dark .card-icon[style*="background: #E8EAF6"][style*="color: #5C6BC0"] {
    background: #1A1C3C !important;
    color: #9FA8DA !important;
}

.theme-dark .card-icon[style*="background: #ECEFF1"][style*="color: #546E7A"] {
    background: #2A2D30 !important;
    color: #90A4AE !important;
}

.theme-dark .card-icon[style*="background: #E8EAF6"][style*="color: #283593"] {
    background: #1A1C3C !important;
    color: #7986CB !important;
}

.theme-dark .card-icon[style*="background: #E3F2FD"][style*="color: #1565C0"] {
    background: #1A2B3C !important;
    color: #64B5F6 !important;
}

.theme-dark .card-icon[style*="background: #E0F7FA"][style*="color: #00838F"] {
    background: #1A2E30 !important;
    color: #4DD0E1 !important;
}

.theme-dark .card-icon[style*="background: #FFF8E1"][style*="color: #F57F17"] {
    background: #3E3520 !important;
    color: #FFD54F !important;
}

.theme-dark .card-icon[style*="background: #EFEBE9"][style*="color: #4E342E"] {
    background: #3E2E2A !important;
    color: #A1887F !important;
}

.theme-dark .card-icon[style*="background: #FCE4EC"][style*="color: #880E4F"] {
    background: #3D1F28 !important;
    color: #F06292 !important;
}

/* الكذب */
.theme-dark .card-icon[style*="background: #FCE4EC"][style*="color: #880E4F"] {
    background: #3D1F28 !important;
    color: #F06292 !important;
}

.theme-dark .card-icon[style*="background: #FFEBEE"][style*="color: #B71C1C"] {
    background: #3D1F20 !important;
    color: #EF5350 !important;
}

.theme-dark .card-icon[style*="background: #FFF3E0"][style*="color: #BF360C"] {
    background: #3E2E1A !important;
    color: #FF7043 !important;
}

.theme-dark .card-icon[style*="background: #ECEFF1"][style*="color: #546E7A"] {
    background: #2A2D30 !important;
    color: #90A4AE !important;
}

.theme-dark .card-icon[style*="background: #FFEBEE"][style*="color: #B71C1C"] {
    background: #3D1F20 !important;
    color: #EF5350 !important;
}

.theme-dark #update-status span {
    color: var(--text-secondary) !important;
}

.theme-dark #update-message span {
    color: var(--text-primary) !important;
}


.theme-dark #card-number {
    color: white !important;
}

.theme-dark #copy-card-btn {
    background: var(--primary-gradient) !important;
    color: white !important;
}


.achievement-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    animation: achievementSlideDown 0.5s ease;
    transition: opacity 0.5s ease;
}

.achievement-card {
    background: var(--surface);
    padding: 24px 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    text-align: center;
    min-width: 280px;
    border-right: 4px solid var(--primary);
}

@keyframes achievementSlideDown {
    from { top: -100px; opacity: 0; }
    to { top: 20px; opacity: 1; }
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.achievement-item {
    text-align: center;
    padding: 16px 12px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-item.unlocked {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.achievement-item.unlocked:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.achievement-item i {
    display: block;
    font-size: 30px;
    margin-bottom: 8px;
}

.achievement-item p {
    font-weight: 600;
    margin-top: 8px;
    font-size: 13px;
}

.achievement-item small {
    color: var(--text-tertiary);
    font-size: 11px;
}

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.progress-bar-container {
    background: var(--border-light);
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    transition: width 0.8s ease;
    min-width: 40px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.mini-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.mini-stats div span {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
}

.mini-stats div strong {
    display: block;
    font-size: 22px;
    color: var(--primary);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding-top: 80px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.search-container {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: searchIn 0.3s ease;
}

@keyframes searchIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.search-header i {
    color: var(--text-tertiary);
    font-size: 18px;
}

.search-header input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.search-header input::placeholder {
    color: var(--text-disabled);
}

.search-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.search-header button:hover {
    background: var(--surface-variant);
    color: var(--text-primary);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--surface-variant);
}

.search-result-item small {
    color: var(--text-tertiary);
    margin-right: auto;
    font-size: 12px;
}

#quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

#quiz-question {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quiz-option {
    text-align: right !important;
    justify-content: flex-start !important;
    width: 100%;
    padding: 14px 16px !important;
}

.quiz-option:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}

.quiz-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.theme-dark .achievement-card {
    background: var(--surface);
    border-color: var(--border);
}

.theme-dark .achievement-item {
    background: var(--surface);
    border-color: var(--border);
}

.theme-dark .achievement-item.unlocked {
    border-color: var(--primary);
}

.theme-dark .stat-card {
    background: var(--surface);
}

.theme-dark .search-container {
    background: var(--surface);
}

.theme-dark .search-header {
    border-bottom-color: var(--border);
}

.theme-dark .search-header input {
    color: var(--text-primary);
}

.theme-dark .search-result-item {
    border-bottom-color: var(--border);
}

.theme-dark .search-result-item:hover {
    background: var(--surface-variant);
}

.theme-dark .quiz-option:hover {
    background: var(--primary-light) !important;
}

.theme-dark .progress-bar-container {
    background: var(--border);
}

@media (max-width: 767px) {
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 14px 10px;
    }
    
    .stat-number {
        font-size: 22px;
    }
    
    .stat-card i {
        font-size: 22px;
    }
    
    .search-overlay {
        padding-top: 40px;
    }
    
    .search-container {
        width: 95%;
        max-height: 80vh;
    }
    
    .achievement-popup {
        width: 90%;
    }
    
    .achievement-card {
        min-width: auto;
        padding: 16px 20px;
    }
}

@media (max-width: 400px) {
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

.theme-dark .settings-group h3 .fa-gift {
    color: #F06292 !important;
}

.theme-dark .settings-group [style*="background: #E8F5E9"] {
    background: #1B3A1B !important;
}

.theme-dark .settings-group [style*="background: #E3F2FD"] {
    background: #1A2B3C !important;
}

.theme-dark .settings-group [style*="background: #FCE4EC"] {
    background: #3D1F28 !important;
}

.theme-dark .settings-group [style*="background: #FFF3E0"] {
    background: #3E2E1A !important;
}

.theme-dark .settings-group [style*="background: #E8EAF6"] {
    background: #1A1C3C !important;
}

.theme-dark .settings-group [style*="background: #E0F2F1"] {
    background: #1A3A3C !important;
}

.theme-dark .settings-group [style*="background: #F3E5F5"] {
    background: #2A1A3C !important;
}

.theme-dark .settings-group [style*="background: #FFEBEE"] {
    background: #3D1F20 !important;
}

.theme-dark .settings-group [style*="background: #ECEFF1"] {
    background: #2A2D30 !important;
}

.theme-dark .settings-group [style*="background: #FFF8E1"] {
    background: #3E3520 !important;
}

#changelog-content {
    animation: changelogFadeIn 0.3s ease;
}

@keyframes changelogFadeIn {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

#changelog-arrow {
    transition: transform 0.3s ease;
}

.theme-dark .settings-item [style*="background: #FCE4EC"] {
    background: #3D1F28 !important;
}

.theme-dark .settings-item [style*="color: #E91E63"] {
    color: #F06292 !important;
}

.theme-dark .settings-item span[style*="color: #E91E63"] {
    color: #F06292 !important;
    background: #3D1F28 !important;
}

.dua-content {
    background: var(--surface-variant);
    padding: 24px;
    border-radius: var(--radius-lg);
    border-right: 4px solid var(--primary);
    color: var(--text-primary);
}

.theme-dark .dua-content {
    background: var(--surface-variant);
    border-right-color: var(--primary);
}

.theme-dark .card[style*="background: #FFF8E1"] {
    background: #3E3520 !important;
    border-color: #5D4037 !important;
}

.theme-dark .card[style*="color: #F57F17"] {
    color: #FFB74D !important;
}

.search-bar-container {
    cursor: pointer;
    margin-bottom: 8px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    transition: all 0.3s ease;
    gap: 8px;
}

.search-bar:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 107, 110, 0.1);
}

.search-bar kbd {
    font-family: var(--font-mono);
    font-size: 10px;
}

/* المظهر الداكن */
.theme-dark .search-bar {
    background: var(--surface);
    border-color: var(--border);
}

.theme-dark .search-bar:hover {
    border-color: var(--primary);
}

.theme-dark .search-bar kbd {
    background: var(--surface-variant);
    color: var(--text-tertiary);
}

.theme-dark .card-icon[style*="background: #E0F7FA"] {
    background: #1A2E30 !important;
    color: #4DD0E1 !important;
}

#changelog-content ul {
    list-style: none;
    padding: 0;
}

#changelog-content ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

#changelog-content ul li:last-child {
    border-bottom: none;
}

#changelog-content ul li:hover {
    color: var(--text-primary);
}

.theme-dark #changelog-content ul li {
    color: var(--text-secondary);
    border-bottom-color: var(--border);
}

.theme-dark #changelog-content ul li:hover {
    color: var(--text-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-header div {
    padding: 8px 4px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-tertiary);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    cursor: default;
    transition: all 0.2s;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day:hover {
    transform: scale(1.1);
}

.prayer-card {
    border-right: 3px solid #4A148C;
    transition: all 0.3s;
}

.prayer-card:hover {
    border-right-color: #7B1FA2;
    box-shadow: var(--shadow-md);
}

.update-notification-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFF8E1;
    border: 1px solid #FFC107;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideDownIn 0.4s ease;
    position: relative;
    overflow: hidden;
}

.update-notification-bar:hover {
    background: #FFF3C4;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
    transform: translateY(-1px);
}

.update-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FF9800;
    flex-shrink: 0;
    animation: updatePulse 2s infinite;
}

.update-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #E65100;
}

.update-close-btn {
    background: none;
    border: none;
    color: #BF360C;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.update-close-btn:hover {
    background: rgba(191, 54, 12, 0.1);
}

@keyframes slideDownIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@keyframes updatePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.theme-dark .update-notification-bar {
    background: #3E2E1A;
    border-color: #FF9800;
}

.theme-dark .update-notification-bar:hover {
    background: #4E3E2A;
}

.theme-dark .update-text {
    color: #FFB74D;
}

.theme-dark .update-close-btn {
    color: #FFB74D;
}

/* Nutrition & Exercise */
.nutrition-meal-card {
    border-right: 4px solid var(--primary);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.nutrition-meal-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.food-conflict-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.food-conflict-severity {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    font-weight: 600;
}

.exercise-today-card {
    border: 2px solid #4CAF50 !important;
    background: #E8F5E9 !important;
}

.theme-dark .exercise-today-card {
    background: #1B3A1B !important;
    border-color: #4CAF50 !important;
}

.forbidden-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin: 4px;
}

.theme-dark .nutrition-meal-card {
    background: var(--surface);
}


.theme-dark .card-icon[style*="background:#FFF3E0"][style*="color:#FF9800"] {
    background: #3E2E1A !important;
    color: #FFB74D !important;
}

.theme-dark .card-icon[style*="background:#E8F5E9"][style*="color:#4CAF50"] {
    background: #1B3A1B !important;
    color: #66BB6A !important;
}

.theme-dark .card-icon[style*="background:#FCE4EC"][style*="color:#F44336"] {
    background: #3D1F28 !important;
    color: #EF5350 !important;
}


.theme-dark #meal-check-result div[style*="background:#E8F5E9"] {
    background: #1B3A1B !important;
}

.theme-dark #meal-check-result div[style*="background:#E8F5E9"] p {
    color: #81C784 !important;
}

.theme-dark #meal-check-result div[style*="background:#FCE4EC"] {
    background: #3D1F28 !important;
}

.theme-dark #meal-check-result div[style*="background:#FCE4EC"] strong,
.theme-dark #meal-check-result div[style*="background:#FCE4EC"] p {
    color: #EF9A9A !important;
}

.theme-dark #meal-check-result div[style*="background:#FFF3E0"] {
    background: #3E2E1A !important;
}

.theme-dark #meal-check-result div[style*="background:#FFF3E0"] strong,
.theme-dark #meal-check-result div[style*="background:#FFF3E0"] p {
    color: #FFCC80 !important;
}

.theme-dark #meal-check-result div[style*="background:#FFF8E1"] {
    background: #3E3520 !important;
}

.theme-dark #meal-check-result div[style*="background:#FFF8E1"] strong,
.theme-dark #meal-check-result div[style*="background:#FFF8E1"] p {
    color: #FFE082 !important;
}

.theme-dark #meal-check-result .fa-check-circle {
    color: #66BB6A !important;
}

.theme-dark #meal-check-result .fa-exclamation-triangle {
    color: #EF9A9A !important;
}

.theme-dark .nutrition-meal-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

.theme-dark .nutrition-meal-card h3 {
    color: var(--text-primary) !important;
}

.theme-dark .nutrition-meal-card p {
    color: var(--text-primary) !important;
}

.theme-dark .nutrition-meal-card span {
    color: var(--text-secondary) !important;
}

.theme-dark .nutrition-meal-card div[style*="font-size:12px;color:var(--text-tertiary)"] span {
    color: var(--text-tertiary) !important;
}

.theme-dark .nutrition-meal-card div[style*="background:#FFF3E0"] {
    background: #3E2E1A !important;
    border: 1px solid #5D4037 !important;
}

.theme-dark .nutrition-meal-card div[style*="background:#FFF3E0"] p {
    color: #FFCC80 !important;
}

.theme-dark .nutrition-meal-card p[style*="font-size:11px;color:var(--primary)"] {
    color: var(--primary) !important;
}

.theme-dark .btn.btn-sm[style*="background:transparent"] {
    color: var(--text-secondary) !important;
}

.theme-dark .forbidden-tag[style*="background:#FCE4EC"] {
    background: #3D1F28 !important;
    color: #EF9A9A !important;
    border: 1px solid #5D3A3A !important;
}

.theme-dark div[style*="background:#FCE4EC"][style*="border-right:4px solid #E91E63"] {
    background: #3D1F28 !important;
    border-right-color: #F06292 !important;
}

.theme-dark div[style*="background:#FCE4EC"][style*="border-right:4px solid #E91E63"] h3 {
    color: #F06292 !important;
}

.theme-dark div[style*="background:#FCE4EC"][style*="border-right:4px solid #E91E63"] p {
    color: #EF9A9A !important;
}

.theme-dark .heading-underline {
    color: var(--text-primary) !important;
}

.theme-dark p[style*="color:var(--text-secondary)"] {
    color: var(--text-secondary) !important;
}

.theme-dark .nutrition-meal-card .fa-sun {
    color: #FFB74D !important;
}

.theme-dark .nutrition-meal-card .fa-moon {
    color: #9FA8DA !important;
}

.theme-dark .nutrition-meal-card .fa-fire {
    color: #EF9A9A !important;
}

.theme-dark .nutrition-meal-card .fa-dumbbell {
    color: #81C784 !important;
}

.theme-dark .nutrition-meal-card .fa-wallet {
    color: #FFCC80 !important;
}

.theme-dark .nutrition-meal-card .fa-running {
    color: #81C784 !important;
}

.theme-dark .nutrition-meal-card .fa-exchange-alt {
    color: var(--primary) !important;
}

.theme-dark #analysis-result div[style*="background:#FCE4EC"] {
    background: #3D1F28 !important;
    border-color: #5D3A3A !important;
}

.theme-dark #analysis-result div[style*="background:#FCE4EC"] strong {
    color: #EF9A9A !important;
}

.theme-dark #analysis-result div[style*="background:#FCE4EC"] p {
    color: #EF9A9A !important;
}

.theme-dark #analysis-result div[style*="background:#FCE4EC"] span {
    color: white !important;
    background: #F44336 !important;
}

.theme-dark #analysis-result div[style*="background:#E8F5E9"] {
    background: #1B3A1B !important;
    border-color: #2E5C2E !important;
}

.theme-dark #analysis-result div[style*="background:#E8F5E9"] strong {
    color: #A5D6A7 !important;
}

.theme-dark #analysis-result div[style*="background:#E8F5E9"] p {
    color: #A5D6A7 !important;
}

.theme-dark #analysis-result div[style*="background:#E8F5E9"] span {
    color: white !important;
    background: #4CAF50 !important;
}

.theme-dark #analysis-result div[style*="flex:1"] {
    border: 1px solid var(--border) !important;
}

.theme-dark #analysis-result div[style*="background:#E3F2FD"] {
    background: #1A2B3C !important;
}

.theme-dark #analysis-result div[style*="background:#E3F2FD"] div,
.theme-dark #analysis-result div[style*="background:#E3F2FD"] span {
    color: #90CAF9 !important;
}

.theme-dark #analysis-result div[style*="text-align:center;padding:16px;border-radius:12px"] {
    border: 1px solid var(--border) !important;
}

.theme-dark #analysis-result .ingredient-tag {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.theme-dark #analysis-result .fa-check-circle {
    color: #66BB6A !important;
}

.theme-dark #analysis-result .fa-exclamation-triangle {
    color: #EF9A9A !important;
}

.theme-dark #analysis-result h4 {
    color: var(--text-primary) !important;
}

.theme-dark .conflict-db-item[style*="background:#FCE4EC"] strong,
.theme-dark .conflict-db-item[style*="background:#FCE4EC"] p {
    color: #EF9A9A !important;
}

.theme-dark .conflict-db-item[style*="background:#FFF3E0"] strong,
.theme-dark .conflict-db-item[style*="background:#FFF3E0"] p {
    color: #FFCC80 !important;
}

.theme-dark .conflict-db-item[style*="background:#FFF8E1"] strong,
.theme-dark .conflict-db-item[style*="background:#FFF8E1"] p {
    color: #FFE082 !important;
}

.theme-dark .conflict-db-item[style*="background:#E8F5E9"] strong,
.theme-dark .conflict-db-item[style*="background:#E8F5E9"] p {
    color: #A5D6A7 !important;
}

/*
 * Dual date display (Hijri and Gregorian)
 * Simple classic design - Dark mode compatible
*/

.dual-date-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 0;
    margin: 4px 0;
    direction: rtl;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.date-card {
    display: flex;
    align-items: center;
    gap: 4px;
}

.date-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.date-value {
    color: var(--primary);
    font-weight: 600;
}

.date-month {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Date separator
.date-card:first-child::after {
    content: '|';
    margin-right: 12px;
    color: var(--border);
}
*/

/* Mobile version*/
@media (max-width: 400px) {
    .dual-date-container {
        flex-direction: column;
        gap: 2px;
        font-size: 0.8rem;
    }
    
    .date-card:first-child::after {
        display: none;
    }
}

/* button Back */

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-bottom: 12px;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    direction: rtl;
}

.back-button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-2px);
}

.back-button i {
    font-size: 0.8rem;
}

/* 
 * Forgetfulness
*/

.forgetfulness-page {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 4px 0 32px;
    direction: rtl;
}

.forgetfulness-header {
    text-align: center;
    margin-bottom: 20px;
}

.forgetfulness-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    font-size: 26px;
}

.forgetfulness-subtitle {
    margin: 8px auto 0;
    max-width: 560px;
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 14px;
}

.forgetfulness-info-card,
.forgetfulness-note,
.forgetfulness-complete-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    margin-bottom: 18px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 12px;
}

.forgetfulness-info-card i,
.forgetfulness-note i,
.forgetfulness-complete-note i {
    flex: 0 0 auto;
    color: var(--primary);
    margin-top: 4px;
}

.forgetfulness-section-title {
    margin: 20px 0 10px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 15px;
}

.forgetfulness-prayer-list {
    display: grid;
    gap: 10px;
}

.forgetfulness-prayer-card {
    width: 100%;
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text-primary);
    text-align: right;
    direction: rtl;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.forgetfulness-prayer-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

.forgetfulness-prayer-card:active {
    transform: scale(0.985);
}

.forgetfulness-prayer-card-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--background);
    color: var(--primary);
    font-size: 18px;
}

.forgetfulness-prayer-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.forgetfulness-prayer-card-text strong {
    font-size: 14px;
    font-weight: 700;
}

.forgetfulness-prayer-card-text small {
    color: var(--text-secondary);
    font-size: 12px;
}

.forgetfulness-arrow {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Session */

.forgetfulness-session {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.forgetfulness-session-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.forgetfulness-small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    -webkit-tap-highlight-color: transparent;
}

.forgetfulness-prayer-name {
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
}

.forgetfulness-rakah-counter {
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.forgetfulness-progress {
    margin-bottom: 14px;
}

.forgetfulness-progress-track {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--border-light);
}

.forgetfulness-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.2s ease;
}

.forgetfulness-current-card {
    flex: 1;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    text-align: center;
}

.forgetfulness-current-rakah {
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.forgetfulness-phase-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--background);
    color: var(--primary);
    font-size: 30px;
}

.forgetfulness-phase-label {
    color: var(--text-primary);
    font-size: 25px;
    font-weight: 800;
}

.forgetfulness-phase-description {
    max-width: 430px;
    margin: 9px auto 22px;
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 13px;
}

.forgetfulness-record-button {
    width: min(100%, 430px);
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    transition: transform 0.12s ease, opacity 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.forgetfulness-record-button:active {
    transform: scale(0.975);
}

.forgetfulness-record-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.forgetfulness-tap-hint {
    margin-top: 12px;
    color: var(--text-tertiary);
    font-size: 11px;
}

/* Checklist */

.forgetfulness-checklist-card {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.forgetfulness-checklist-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.forgetfulness-checklist-title span:last-child {
    color: var(--text-tertiary);
    font-weight: 500;
}

.forgetfulness-checklist {
    display: grid;
    gap: 7px;
}

.forgetfulness-check-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 9px;
    background: var(--background);
    color: var(--text-secondary);
    font-size: 12px;
}

.forgetfulness-check-item.completed {
    color: var(--text-primary);
}

.forgetfulness-check-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-tertiary);
    font-size: 11px;
}

.forgetfulness-check-item.completed .forgetfulness-check-icon {
    background: var(--primary);
    color: #fff;
}

.forgetfulness-check-status {
    margin-right: auto;
    color: var(--text-tertiary);
    font-size: 10px;
}

.forgetfulness-check-item.completed .forgetfulness-check-status {
    color: var(--primary);
}

.forgetfulness-session-actions {
    margin-top: 10px;
    text-align: center;
}

.forgetfulness-undo-button {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 9px 12px;
    font-size: 11px;
    cursor: pointer;
}

.forgetfulness-undo-button:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Completion */

.forgetfulness-complete {
    text-align: center;
    padding-top: 28px;
}

.forgetfulness-complete-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 34px;
}

.forgetfulness-complete h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 24px;
}

.forgetfulness-complete-subtitle {
    margin: 8px 0 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.forgetfulness-summary-card {
    max-width: 520px;
    margin: 0 auto 14px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    text-align: right;
}

.forgetfulness-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 12px;
}

.forgetfulness-summary-row:last-child {
    border-bottom: 0;
}

.forgetfulness-summary-row strong {
    color: var(--text-primary);
}

.forgetfulness-complete-note {
    max-width: 520px;
    margin: 0 auto 18px;
    text-align: right;
}

.forgetfulness-complete-actions {
    max-width: 520px;
    margin: 0 auto;
    display: grid;
    gap: 9px;
}

/* Mobile */

@media (max-width: 600px) {
    .forgetfulness-page {
        padding-bottom: 20px;
    }

    .forgetfulness-session {
        min-height: calc(100vh - 95px);
    }

    .forgetfulness-current-card {
        min-height: 360px;
        border-radius: 17px;
    }

    .forgetfulness-phase-label {
        font-size: 23px;
    }

    .forgetfulness-record-button {
        min-height: 88px;
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .forgetfulness-session-top {
        grid-template-columns: auto 1fr;
    }

    .forgetfulness-rakah-counter {
        grid-column: 1 / -1;
        text-align: center;
        order: 3;
    }

    .forgetfulness-current-card {
        min-height: 330px;
        padding: 20px 12px;
    }
}

/* 
 * Leaderboard - Total Points Card (Fixing Bugs)
 * Theme Adaptive / Hover Safe
*/

/* light mode */
.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

/* icon */
.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] i {
    color: #D99A00 !important;
}

/* Points number*/
.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] div {
    color: var(--text-primary) !important;
}

/* Text */
.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] p {
    color: var(--text-secondary) !important;
}

/*    
 * Hover It preserves animation without changing colors.
*/

.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"]:hover {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"]:hover i {
    color: #D99A00 !important;
}

.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"]:hover div {
    color: var(--text-primary) !important;
}

.card[style*="linear-gradient(135deg,#FFD700,#FFA000)"]:hover p {
    color: var(--text-secondary) !important;
}

/* 
 * Dark mode
*/

.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"],
body.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] i,
body.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] i {
    color: #FFD700 !important;
}

.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] div,
body.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] div {
    color: var(--text-primary) !important;
}

.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] p,
body.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"] p {
    color: var(--text-secondary) !important;
}

/* Hover in dark mode */
.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"]:hover,
body.dark-mode .card[style*="linear-gradient(135deg,#FFD700,#FFA000)"]:hover {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

/* 
 * Quiz - Previous Score Comparison (Fixing Bugs)
 * Light / Dark Theme
*/

/* light mode*/
.quiz-history-comparison {
    background: #E3F2FD;
    color: #1565C0;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.quiz-history-comparison p {
    margin: 0;
    font-size: 12px;
    color: #1565C0;
}

.quiz-history-comparison i {
    margin-left: 4px;
    color: #1565C0;
}


/* 
 * Dark Mode The project uses body.theme-dark
*/

body.theme-dark .quiz-history-comparison {
    background: #263238 !important;
    color: #90CAF9 !important;
}

body.theme-dark .quiz-history-comparison p {
    color: #90CAF9 !important;
}

body.theme-dark .quiz-history-comparison i {
    color: #90CAF9 !important;
}


/* 
 * Prevent any general rules from changing colors, During Hover
*/

body.theme-dark .quiz-history-comparison:hover {
    background: #263238 !important;
    color: #90CAF9 !important;
}

body.theme-dark .quiz-history-comparison:hover p {
    color: #90CAF9 !important;
}

body.theme-dark .quiz-history-comparison:hover i {
    color: #90CAF9 !important;
}