/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 50%, #1e3a1a 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* App Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 300;
}

.add-adhkar-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.add-adhkar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.clear-cache-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.clear-cache-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    position: relative;
}

/* Adhkar Grid */
.adhkar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Adhkar Card */
.adhkar-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.adhkar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.adhkar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
}

.adhkar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.adhkar-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.adhkar-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.delete-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Progress Section */
.progress-section {
    margin-bottom: 25px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.count-display {
    text-align: center;
    margin-bottom: 20px;
}

.current-count {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.count-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Counter Button */
.counter-btn {
    width: 100%;
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.counter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.4);
}

.counter-btn:active {
    transform: translateY(0);
}

.counter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.counter-btn:active::before {
    width: 300px;
    height: 300px;
}

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

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #ecf0f1;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #7f8c8d;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.modal-body {
    padding: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

input, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4a7c59;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.4);
}

.btn-secondary {
    background: #ecf0f1;
    color: #7f8c8d;
}

.btn-secondary:hover {
    background: #d5dbdb;
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .app-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px 20px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .adhkar-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .adhkar-card {
        padding: 25px 20px;
    }
    
    .current-count {
        font-size: 2.5rem;
    }
    
    .modal {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .adhkar-card {
        padding: 20px 15px;
    }
    
    .current-count {
        font-size: 2rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.pulse {
    animation: pulse 0.3s ease;
}

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

/* Hidden class */
.hidden {
    display: none !important;
}

/* Completed Adhkars Section */
.completed-section {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.completed-header {
    padding: 20px 30px;
    background: rgba(45, 90, 39, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: white;
}

.completed-header:hover {
    background: rgba(45, 90, 39, 0.3);
}

.completed-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.completed-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.completed-section.expanded .toggle-icon {
    transform: rotate(180deg);
}

.completed-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.completed-section.expanded .completed-content {
    max-height: 2000px;
}

.completed-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.completed-adhkar-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    opacity: 0.8;
}

.completed-adhkar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.completed-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .completed-header {
        padding: 15px 20px;
    }
    
    .completed-title {
        font-size: 1.1rem;
    }
    
    .completed-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}