:root {
    --primary-color: #2E7D32;
    --secondary-color: #81C784;
    --accent-color: #FFF8E1;
    --light-color: #FFFFFF;
    --dark-color: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f9f9f9;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="%234A90E2" fill-opacity="0.05" fill-rule="evenodd"/%3E%3C/svg%3E');
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.navbar {
    background-color: var(--primary-color);
    color: var(--light-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
}

.nav-link {
    color: var(--light-color);
    text-decoration: none;
    padding: 10px 15px;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    text-align: center;
    padding: 120px 0 80px;
    margin-top: 60px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 1.2s ease;
}

.hero-text {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 1.2s ease;
}

.tasbih-section {
    padding: 80px 0;
}

.tasbih-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.tasbih-mode {
    display: flex;
    align-items: center;
}

.tasbih-select {
    margin-right: 10px;
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: var(--light-color);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#timer {
    font-size: 1.2rem;
    font-weight: 500;
    background-color: rgba(74, 144, 226, 0.1);
    padding: 8px 15px;
    border-radius: 5px;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.timer-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.timer-btn:hover {
    background-color: #3A80D2;
}

.reset-btn {
    background-color: #f44336;
    color: var(--light-color);
}

.reset-btn:hover {
    background-color: #d32f2f;
}

.save-btn, .load-btn {
    background-color: var(--accent-color);
    color: var(--dark-color);
    margin-right: 10px;
}

.save-btn:hover, .load-btn:hover {
    background-color: #C09C30;
}

.tasbih-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.dhikr-container {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 200px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.dhikr-container.active {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.dhikr-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.counter-display {
    font-size: 1.5rem;
    font-weight: 700;
}

.separator {
    color: #aaa;
    margin: 0 5px;
}

.tasbih-beads-container {
    position: relative;
    margin: 50px auto;
    max-width: 600px;
}

.tasbih-string {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #d4af37;
    z-index: 1;
}

.beads-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    padding: 20px 0;
}

.bead {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    margin: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 2px solid #d4af37;
}

.bead.active {
    background: linear-gradient(135deg, var(--accent-color), #f5d76e);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.bead.completed {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.tasbih-button-container {
    text-align: center;
    margin-top: 40px;
}

.tasbih-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--light-color);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Tajawal', sans-serif;
}

.tasbih-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

.tasbih-button:active {
    transform: scale(0.95);
}

.tasbih-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: all 0.5s ease;
}

.tasbih-button:active::before {
    transform: scale(2);
    opacity: 0;
}

.current-dhikr {
    position: relative;
    z-index: 2;
}

.save-progress {
    text-align: center;
    margin-top: 40px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #3A80D2;
}

.footer {
    background-color: var(--primary-color);
    color: var(--light-color);
    text-align: center;
    padding: 40px 0;
}

.hadith {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.8;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 15px;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .tasbih-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .tasbih-display {
        flex-direction: column;
    }

    .dhikr-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .tasbih-button {
        width: 100px;
        height: 100px;
        font-size: 1rem;
    }

    .bead {
        width: 25px;
        height: 25px;
        margin: 3px;
    }
}