:root {
--primary-color: #1a5e63;
--secondary-color: #f1c40f;
--accent-color: #2c3e50;
--light-color: #f8f9fa;
--dark-color: #343a40;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Tahoma', 'Arial', sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
color: var(--dark-color);
line-height: 1.6;
min-height: 100vh;
padding-bottom: 2rem;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}

img {
pointer-events: none;
}

.container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}

header {
background: linear-gradient(to right, var(--primary-color), #2c7c82);
color: white;
padding: 1.5rem 0;
box-shadow: var(--shadow);
position: relative;
overflow: hidden;
}

header::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.header-content {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 1;
}

.logo {
display: flex;
align-items: center;
}

.logo i {
font-size: 2rem;
margin-left: 10px;
color: var(--secondary-color);
}

.logo h1 {
font-size: 1.5rem;
font-weight: 700;
}

.back-btn {
display: inline-flex;
align-items: center;
background: rgba(255, 255, 255, 0.2);
color: white;
padding: 8px 15px;
border-radius: 50px;
text-decoration: none;
font-weight: bold;
transition: var(--transition);
}

.back-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateX(-5px);
}

.back-btn i {
margin-right: 5px;
}

main {
padding: 2rem 0;
}

.sura-header {
text-align: center;
margin-bottom: 2rem;
background: white;
padding: 1.5rem;
border-radius: 10px;
box-shadow: var(--shadow);
position: relative;
overflow: hidden;
}

.sura-header::before {
content: "";
position: absolute;
top: 0;
right: 0;
width: 100px;
height: 100px;
background: var(--secondary-color);
opacity: 0.1;
border-radius: 50%;
transform: translate(30px, -30px);
}

.sura-header::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 80px;
height: 80px;
background: var(--primary-color);
opacity: 0.1;
border-radius: 50%;
transform: translate(-30px, 30px);
}

.sura-title {
color: var(--accent-color);
font-size: 1.8rem;
margin-bottom: 0.5rem;
position: relative;
z-index: 1;
}

.sura-info {
display: flex;
justify-content: center;
gap: 1.5rem;
margin-top: 1rem;
position: relative;
z-index: 1;
}

.info-item {
display: flex;
align-items: center;
gap: 0.5rem;
background: var(--light-color);
padding: 0.5rem 1rem;
border-radius: 50px;
font-size: 0.9rem;
}

.info-item i {
color: var(--primary-color);
}

.search-section {
background: white;
padding: 1.5rem;
border-radius: 10px;
box-shadow: var(--shadow);
margin-bottom: 2rem;
}

.search-container {
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}

.search-box {
position: relative;
max-width: 300px;
width: 100%;
}

.search-box input {
width: 100%;
padding: 12px 45px 12px 20px;
border: 2px solid #e0e0e0;
border-radius: 50px;
font-size: 1rem;
transition: var(--transition);
background: white;
}

.search-box input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(26, 94, 99, 0.2);
}

.search-box i {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
color: #777;
}

.search-btn {
background: var(--primary-color);
color: white;
border: none;
padding: 12px 25px;
border-radius: 50px;
cursor: pointer;
font-weight: bold;
transition: var(--transition);
display: flex;
align-items: center;
gap: 0.5rem;
}

.search-btn:hover {
background: #145257;
transform: translateY(-2px);
}

.quick-nav {
display: flex;
gap: 0.5rem;
margin-top: 1rem;
justify-content: center;
flex-wrap: wrap;
}

.nav-btn {
background: var(--light-color);
border: 1px solid #e0e0e0;
padding: 8px 15px;
border-radius: 50px;
cursor: pointer;
transition: var(--transition);
font-size: 0.9rem;
}

.nav-btn:hover {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

.search-results-section {
background: white;
border-radius: 10px;
box-shadow: var(--shadow);
margin-bottom: 2rem;
overflow: hidden;
display: none;
}

.search-results-header {
background: var(--primary-color);
color: white;
padding: 1rem 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}

.search-results-title {
font-size: 1.2rem;
font-weight: bold;
}

.close-search-results {
background: none;
border: none;
color: white;
font-size: 1.2rem;
cursor: pointer;
transition: var(--transition);
}

.close-search-results:hover {
color: var(--secondary-color);
}

.search-results-content {
padding: 1.5rem;
}

.search-result-card {
background: var(--light-color);
border-radius: 10px;
padding: 1.5rem;
box-shadow: var(--shadow);
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
border: 2px solid var(--secondary-color);
}

.ayahs-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}

.ayah-card {
background: white;
border-radius: 10px;
padding: 1.5rem;
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid #eaeaea;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
min-height: 380px;
}

.ayah-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
border-color: var(--primary-color);
}

.ayah-number {
display: inline-flex;
align-items: center;
justify-content: center;
width: 35px;
height: 35px;
background: var(--primary-color);
color: white;
border-radius: 50%;
font-weight: bold;
margin-bottom: 1rem;
font-size: 0.8rem;
}

.image-container {
width: 100%;
height: 200px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
background: #f8f9fa;
border-radius: 8px;
overflow: hidden;
position: relative;
}

.ayah-image {
max-width: 100%;
max-height: 100%;
border-radius: 8px;
transition: var(--transition);
opacity: 0;
transition: opacity 0.5s ease;
}

.ayah-image.loaded {
opacity: 1;
}

.image-placeholder {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #6c757d;
background: #e9ecef;
}

.image-placeholder i {
font-size: 2rem;
margin-bottom: 0.5rem;
}

.ayah-text {
font-size: 1.1rem;
color: #2c3e50;
margin: 1rem 0;
text-align: center;
line-height: 1.8;
max-height: 120px;
overflow-y: auto;
padding: 0.5rem;
width: 100%;
}

.action-buttons {
display: flex;
flex-direction: column;
gap: 0.8rem;
margin-top: auto;
width: 100%;
justify-content: center;
}

.action-row {
display: flex;
gap: 0.8rem;
width: 100%;
justify-content: center;
}

.action-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 12px 20px;
border-radius: 50px;
text-decoration: none;
font-weight: bold;
font-size: 1rem;
transition: var(--transition);
border: none;
cursor: pointer;
flex: 1;
min-width: 0;
min-height: 48px;
}

.download-btn {
background: var(--primary-color);
color: white;
}

.share-btn {
background: #6c757d;
color: white;
}

.listen-btn {
background: #28a745;
color: white;
}

.listen-btn.playing {
background: #dc3545;
}

.action-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.download-btn:hover {
background: #145257;
}

.share-btn:hover {
background: #5a6268;
}

.listen-btn:hover {
background: #218838;
}

.listen-btn.playing:hover {
background: #c82333;
}

.share-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
z-index: 1000;
align-items: center;
justify-content: center;
}

.share-modal-content {
background: white;
padding: 2rem;
border-radius: 15px;
max-width: 450px;
width: 90%;
text-align: center;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
position: relative;
}

.share-modal-close {
position: absolute;
top: 15px;
left: 15px;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: #6c757d;
transition: var(--transition);
}

.share-modal-close:hover {
color: var(--primary-color);
}

.share-modal-title {
color: var(--accent-color);
margin-bottom: 1.5rem;
font-size: 1.3rem;
}

.share-options {
display: flex;
justify-content: center;
gap: 1rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}

.share-option {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
padding: 1rem;
border-radius: 10px;
background: var(--light-color);
transition: var(--transition);
cursor: pointer;
min-width: 80px;
}

.share-option:hover {
background: var(--primary-color);
color: white;
transform: translateY(-3px);
}

.share-option i {
font-size: 1.5rem;
}

.share-option span {
font-size: 0.8rem;
font-weight: bold;
}

.share-link-container {
display: flex;
gap: 0.5rem;
margin-top: 1rem;
}

.share-link-input {
flex: 1;
padding: 10px 15px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 0.9rem;
background: #f8f9fa;
}

.copy-link-btn {
background: var(--secondary-color);
color: var(--dark-color);
border: none;
padding: 10px 15px;
border-radius: 8px;
cursor: pointer;
font-weight: bold;
transition: var(--transition);
}

.copy-link-btn:hover {
background: #e0b82e;
}

.copy-success {
color: #28a745;
font-size: 0.8rem;
margin-top: 0.5rem;
display: none;
}

.loading, .error, .no-results {
text-align: center;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: var(--shadow);
margin: 2rem 0;
}

.loading i {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 1rem;
}

.error, .no-results {
color: #e74c3c;
}

.error i, .no-results i {
font-size: 2rem;
margin-bottom: 1rem;
}

.progress-container {
width: 100%;
background: #e9ecef;
border-radius: 10px;
margin: 1rem 0;
overflow: hidden;
}

.progress-bar {
height: 8px;
background: var(--primary-color);
border-radius: 10px;
width: 0%;
transition: width 0.3s ease;
}

.load-more-container {
text-align: center;
margin: 2rem 0;
}

.load-more-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: var(--secondary-color);
color: var(--dark-color);
padding: 10px 20px;
border-radius: 50px;
text-decoration: none;
font-weight: bold;
transition: var(--transition);
border: none;
cursor: pointer;
font-size: 1rem;
}

.load-more-btn:hover {
background: #e0b82e;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.load-more-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}

.completion-message {
text-align: center;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: var(--shadow);
margin: 2rem 0;
color: var(--primary-color);
}

.completion-message i {
font-size: 2rem;
margin-bottom: 1rem;
color: var(--secondary-color);
}

footer {
background: var(--dark-color);
color: white;
text-align: center;
padding: 1.5rem 0;
margin-top: 2rem;
}

.footer-content {
display: flex;
flex-direction: column;
align-items: center;
}

.social-icons {
display: flex;
gap: 1rem;
margin: 1rem 0;
}

.social-icons a {
color: white;
font-size: 1.2rem;
transition: var(--transition);
}

.social-icons a:hover {
color: var(--secondary-color);
}

.copyright {
font-size: 0.9rem;
opacity: 0.8;
}

.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

a:focus, button:focus, input:focus {
outline: 2px solid var(--secondary-color);
outline-offset: 2px;
}

@media (max-width: 768px) {
.header-content {
flex-direction: column;
gap: 1rem;
}
.sura-title {
font-size: 1.5rem;
}
.sura-info {
flex-direction: column;
gap: 0.8rem;
}
.search-container {
flex-direction: column;
}
.search-box {
max-width: 100%;
}
.ayahs-grid {
grid-template-columns: 1fr;
}
.action-buttons {
gap: 0.6rem;
}
.action-row {
gap: 0.6rem;
}
.action-btn {
padding: 10px 15px;
font-size: 0.9rem;
min-height: 44px;
}
.share-options {
gap: 0.5rem;
}
.share-option {
min-width: 70px;
padding: 0.8rem;
}
}

@media (max-width: 480px) {
.logo {
flex-direction: column;
}
.logo i {
margin-left: 0;
margin-bottom: 0.5rem;
}
.sura-header {
padding: 1rem;
}
.action-buttons {
gap: 0.5rem;
}
.action-row {
flex-direction: column;
gap: 0.5rem;
}
.action-btn {
padding: 12px 15px;
font-size: 0.95rem;
min-height: 46px;
}
}