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

:root {
    --primary-color: #1a2a6c;
    --secondary-color: #b21f1f;
    --accent-color: #fdbb2d;
    --text-color: white;
    --card-bg: rgba(255, 255, 255, 0.15);
    --card-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    min-height: 100vh;
    padding: 15px;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body.dark-mode {
    --primary-color: #0d1b2a;
    --secondary-color: #1b263b;
    --accent-color: #415a77;
    --text-color: #e0e1dd;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 10px;
}

/* Header Styles */
.app-header {
    position: relative;
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.app-title {
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    background: linear-gradient(45deg, var(--accent-color), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    color: #f0f0f0;
    font-size: 1rem;
    margin-bottom: 12px;
}

.bismillah {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 12px 0;
    font-family: 'Traditional Arabic', serif;
}

.prayer-time {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: bold;
}

/* Top Icons */
.top-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.share-btn {
    background: rgba(155, 89, 182, 0.6);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    z-index: 1000;
}

.settings-panel h3 {
    margin-bottom: 20px;
    text-align: center;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: white;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.color-btn {
    padding: 10px 5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

select option {
    background: #2d4059;
    color: white;
}

/* Dark Mode Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

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

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.close-settings {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.close-settings:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Islamic Features */
.islamic-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.feature-btn {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: white;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feature-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.progress-container {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: white;
    font-size: 1.1rem;
}

.progress-bar {
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-btn {
    background: #3498db;
    color: white;
}

.save-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.reset-btn {
    background: #e74c3c;
    color: white;
}

.reset-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.export-btn {
    background: #9b59b6;
    color: white;
}

.export-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

/* Tracker Section */
.tracker-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

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

.section-header h2 {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 40px 10px 15px;
    border-radius: 25px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 200px;
    backdrop-filter: blur(10px);
}

.search-box i {
    position: absolute;
    right: 15px;
    color: var(--accent-color);
}

.tracker-container {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.surah-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 15px 10px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 80px;
    transition: all 0.3s ease;
}

.surah-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.surah-btn.completed {
    background: rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
}

.surah-btn.completed:hover {
    background: rgba(46, 204, 113, 0.5);
}

.surah-number {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.surah-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.arabic-name {
    font-size: 0.8rem;
    font-family: 'Traditional Arabic', serif;
}

.checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #2ecc71;
    font-size: 1rem;
}

.quick-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--card-border);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Inspiration Section */
.inspiration-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    text-align: center;
}

.inspiration-card {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.inspiration-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.inspiration-card p {
    font-size: 1rem;
    font-style: italic;
    color: #f0f0f0;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.close-modal {
    float: right;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

/* Celebration Modal */
.celebration-modal {
    background: rgba(0, 0, 0, 0.9);
}

.celebration-content {
    text-align: center;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    border: 3px solid gold;
    animation: pulse 2s infinite;
}

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

.celebration-header {
    margin-bottom: 20px;
}

.celebration-header i {
    font-size: 4rem;
    color: gold;
    margin-bottom: 15px;
}

.celebration-header h2 {
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.celebration-body h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 15px;
}

.celebration-body p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.quran-verse {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-style: italic;
    border-left: 4px solid gold;
}

.celebration-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.celebration-btn {
    padding: 12px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.celebration-btn {
    background: rgba(46, 204, 113, 0.8);
    color: white;
}

.celebration-btn:hover {
    background: rgba(46, 204, 113, 1);
    transform: translateY(-2px);
}

.share-achievement {
    background: rgba(52, 152, 219, 0.8);
}

.share-achievement:hover {
    background: rgba(52, 152, 219, 1);
}

/* Dua List */
.dua-list {
    text-align: right;
    direction: rtl;
}

.dua-item {
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    padding: 20px;
    border-radius: 15px;
    border-right: 4px solid var(--accent-color);
}

.arabic-text {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: 'Traditional Arabic', serif;
    line-height: 1.6;
}

.translation {
    font-size: 1rem;
    color: #f0f0f0;
    text-align: left;
    direction: ltr;
    margin-bottom: 8px;
}

.benefit {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-style: italic;
    text-align: left;
    direction: ltr;
}

/* Tasbih Counter */
.tasbih-container {
    text-align: center;
}

.tasbih-counter {
    font-size: 4rem;
    margin: 20px 0;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tasbih-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tasbih-btn {
    background: rgba(52, 152, 219, 0.6);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasbih-btn:hover {
    background: rgba(52, 152, 219, 0.8);
    transform: translateY(-2px);
}

.reset-tasbih {
    background: rgba(231, 76, 60, 0.6);
}

.reset-tasbih:hover {
    background: rgba(231, 76, 60, 0.8);
}

.tasbih-stats {
    font-size: 1rem;
    color: #f0f0f0;
}

/* Calendar */
.calendar-container {
    text-align: center;
    margin: 20px 0;
}

.islamic-date {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-family: 'Traditional Arabic', serif;
}

.gregorian-date, .hijri-date {
    font-size: 1.2rem;
    color: #f0f0f0;
    margin-bottom: 8px;
}

/* Quotes */
.quotes-container {
    margin-top: 20px;
}

.quote-item {
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
}

.quote-item p {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.6;
    color: #f0f0f0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .islamic-features {
        grid-template-columns: 1fr;
    }
    
    .surah-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .top-icons {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
    
    .app-header {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .surah-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .inspiration-card {
        flex-direction: column;
        text-align: center;
    }
    
    .celebration-actions {
        flex-direction: column;
    }
    
    .tasbih-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* Scrollbar Styling */
.tracker-container::-webkit-scrollbar {
    width: 8px;
}

.tracker-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.tracker-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.tracker-container::-webkit-scrollbar-thumb:hover {
    background: #fdbb2d;
}