/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
    padding: 0 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(1deg); }
}

/* Header */
header {
    padding: 2rem 0;
    text-align: center;
}

.top-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-button.small {
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-button.small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out;
}

/* Search section */
.search-section {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    color: white;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.search-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Dua grid */
.dua-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dua-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.dua-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dua-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.dua-card:hover::before {
    left: 100%;
}

.dua-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.dua-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.dua-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    line-height: 2;
    margin-bottom: 1rem;
    color: #f0f0f0;
    text-align: right;
    direction: rtl;
}

.dua-translation {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.dua-reference {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.dua-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn-small {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.favorite-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ffd93d, #ff6b6b);
}

/* Favorites section */
.favorites-section {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.favorites-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Quick actions */
.quick-actions {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.quick-actions h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-btn {
    padding: 1.5rem 2rem;
    border: none;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1.2rem 2rem;
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideInRight 0.4s ease-out;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
}

.notification.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
}

.notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dua-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 0 1rem;
    }
    
    .top-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .dua-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dua-card {
        padding: 1.5rem;
    }
    
    .dua-arabic {
        font-size: 1.2rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .dua-card {
        padding: 1rem;
    }
    
    .dua-title {
        font-size: 1.1rem;
    }
    
    .dua-arabic {
        font-size: 1.1rem;
    }
}

/* Hide loading spinner when content is loaded */
.loading-spinner.hidden {
    display: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 0;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
} 