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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.app {
    position: relative;
    min-height: 100vh;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-weight: 300;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

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

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.language-selector {
    position: relative;
}

.language-dropdown {
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 120px;
}

.language-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.language-dropdown option {
    background: #1a1a2e;
    color: white;
}

.dropdown-icon {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.book-card {
    background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2));
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    filter: blur(10px);
    z-index: -1;
}

.book-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.book-card:hover::before {
    opacity: 0.7;
}

.book-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.book-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.book-chapters {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Search Results Styles */
.search-results {
    margin-top: 2rem;
}

.search-results.hidden {
    display: none;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
}

.back-button svg {
    width: 1rem;
    height: 1rem;
}

.search-options {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-type {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-type label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.search-type input[type="radio"] {
    accent-color: #667eea;
}

.book-range {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.book-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    padding: 0.5rem;
    font-size: 0.9rem;
    min-width: 150px;
}

.book-select option {
    background: #1a1a2e;
    color: white;
}

.search-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.search-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 200px;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.result-item strong {
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination.hidden {
    display: none;
}

.page-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.page-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
}

.page-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Chapter Cards */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.chapter-card {
    background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2));
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    filter: blur(10px);
    z-index: -1;
}

.chapter-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.chapter-card:hover::before {
    opacity: 0.7;
}

.chapter-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chapter-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Verses Container */
.verses-container {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.chapter-header h2 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.chapter-header h3 {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.verses-list {
    line-height: 1.8;
    font-size: 1.1rem;
}

.verses-list .verse {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.verses-list .verse-number {
    color: #667eea;
    font-weight: 600;
    margin-right: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .book-card {
        padding: 1rem;
    }
    
    .search-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-type {
        flex-direction: column;
        gap: 1rem;
    }
    
    .book-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .book-select {
        min-width: auto;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .chapter-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .book-name {
        font-size: 0.9rem;
    }
    
    .book-chapters {
        font-size: 0.8rem;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .chapter-card {
        padding: 1rem;
        min-height: 80px;
    }
    
    .chapter-number {
        font-size: 1.2rem;
    }
    
    .chapter-label {
        font-size: 0.8rem;
    }
}