* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2D6A6A;
    --primary-light: #5DCCCC;
    --primary-dark: #1A4444;
    --accent-color: #5DCCCC;
    --bg-color: #F5F5F5;
    --card-bg: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --warning-color: #FFA726;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--card-bg);
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
}

/* Header */
.header {
    background-color: var(--card-bg);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.location svg {
    color: var(--primary-color);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    position: relative;
}

.icon-btn:hover {
    background-color: var(--bg-color);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: #FF5252;
    border-radius: 50%;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

/* Search Bar */
.search-container {
    margin: 16px 20px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    background-color: var(--bg-color);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
}

/* Hero Banner */
.hero-banner {
    margin: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(93, 204, 204, 0.1) 0%, transparent 70%);
}

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

.hero-content h2 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    margin-bottom: 16px;
}

.explore-btn {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-image {
    position: relative;
    z-index: 1;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 12px;
    margin: 20px 20px 16px 20px;
    border-bottom: 2px solid var(--border-color);
    align-items: center;
}

.tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab.active {
    color: var(--primary-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.export-pdf-btn {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.export-pdf-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Verses Container */
.verses-container {
    padding: 0 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--primary-dark);
}

.verses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Verse Card */
.verse-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.verse-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.verse-reference {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.verse-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-btn {
    background: none;
    border: none;
    color: #FF5252;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s;
}

.delete-btn:hover {
    background-color: rgba(255, 82, 82, 0.1);
}

.verse-text {
    font-family: 'Amiri', serif;
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    margin-bottom: 12px;
    padding: 12px;
    background-color: var(--bg-color);
    border-radius: 8px;
}

.verse-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.revision-tracker {
    display: flex;
    gap: 8px;
}

.revision-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-color);
    transition: all 0.3s;
}

.revision-dot.completed {
    background-color: var(--success-color);
}

.tick-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tick-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.tick-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.completed-badge {
    background-color: var(--success-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-btn.active {
    color: var(--primary-color);
}

.nav-btn svg {
    stroke: currentColor;
}

.nav-btn.active svg {
    fill: var(--primary-color);
}

.nav-btn:hover {
    background-color: rgba(45, 106, 106, 0.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

#verseInput {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Amiri', serif;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 16px;
    direction: rtl;
    text-align: right;
}

#verseInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

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

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

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

/* Responsive Design */
@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 16px;
    }

    .hero-content p {
        font-size: 11px;
    }

    .stats-section {
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-number {
        font-size: 24px;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-dark);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    animation: slideUp 0.3s;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: #FF5252;
}

/* Back Button */
.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    color: var(--primary-color);
}

.back-btn:hover {
    background-color: var(--bg-color);
}

/* Stats Page Styles */
.stats-page-content {
    padding: 20px;
}

.progress-section {
    text-align: center;
    margin-bottom: 32px;
}

.progress-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.circular-progress {
    display: inline-block;
}

.circular-progress svg {
    transform: rotate(0deg);
}

.detailed-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-name {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.revision-breakdown,
.surah-summary,
.recent-activity {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.revision-breakdown h3,
.surah-summary h3,
.recent-activity h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.breakdown-item:last-child {
    margin-bottom: 0;
}

.breakdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    font-size: 13px;
    color: var(--text-primary);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.breakdown-bar {
    flex: 1;
    height: 8px;
    background-color: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    transition: width 0.6s ease;
}

.breakdown-count {
    min-width: 30px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

.surah-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.surah-item {
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.surah-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.surah-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.surah-percentage {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.surah-progress-bar {
    height: 6px;
    background: white;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.surah-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.6s ease;
}

.surah-counts {
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-state-small {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* Notes Page Styles */
.notes-page-content {
    padding: 20px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.note-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.note-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    margin-right: 8px;
}

.note-card-actions {
    display: flex;
    gap: 4px;
}

.note-action-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.note-card-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-footer {
    font-size: 11px;
    color: var(--text-secondary);
}

.note-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.note-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.note-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
    margin-bottom: 16px;
}

.note-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.note-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
}

/* Profile Page Styles */
.profile-page-content {
    padding: 20px;
}

.profile-header {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    margin-bottom: 24px;
    color: white;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    backdrop-filter: blur(10px);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.edit-profile-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.edit-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}

.quick-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.quick-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-section,
.about-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h3,
.about-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 12px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-color);
    border: none;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.setting-item-btn:hover {
    background: var(--border-color);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setting-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setting-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.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: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.about-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
