body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    scroll-behavior: smooth;
    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 h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-button.small {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    margin: 0 1rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    color: white;
    display: inline-block;
    min-width: 140px;
    text-align: center;
}

.nav-button.small:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.top-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    align-self: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Controls container */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 100%;
}

.controls input,
.controls select,
.controls button {
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    border: none;
    font-size: 1rem;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    font-weight: 600;
}

.controls input {
    margin: 0.3rem 0;
}

.controls select {
    margin: 0.3rem 0;
}

.controls button {
    margin: 0.3rem 0;
    cursor: pointer;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.controls input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.controls button:hover,
.controls select:hover,
.controls input:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.controls button:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    border-color: rgba(34, 197, 94, 0.5);
}

/* Loading and error states */
.loading, .error {
    text-align: center;
    padding: 3rem 2rem;
    font-size: 1.3rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.loading {
    color: #22c55e;
    animation: pulse 2s infinite;
}

.error {
    color: #f87171;
}

/* Verse container */
#verseContainer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    width: 95%;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: left;
    overflow-y: auto;
    max-height: 65vh;
    line-height: 1.6;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Surah header */
.surah-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.surah-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.surah-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.surah-controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    padding: 1rem 2rem;
    border-radius: 1.2rem;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.control-btn.favorited {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    border-color: rgba(239, 68, 68, 0.5);
}

/* Verse styling */
.verse {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.verse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.verse:hover::before {
    opacity: 1;
}

.verse:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.verse.playing {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
    border-color: rgba(34, 197, 94, 0.3);
    animation: pulse 2s infinite;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
}

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

.verse-number {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.verse-controls {
    display: flex;
    gap: 0.8rem;
}

.play-btn, .favorite-btn {
    padding: 0.8rem;
    border-radius: 0.8rem;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.play-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.favorite-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.4));
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.5);
}

.verse-text {
    margin-top: 1rem;
}

.arabic-text {
    font-size: 1.5rem;
    line-height: 2.2;
    margin-bottom: 1rem;
    text-align: right;
    direction: rtl;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.verse-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 500;
}

/* Nav button (shared from home) */
.nav-button {
    text-decoration: none;
    color: white;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 1.2rem;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-button:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    margin-top: 3rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

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

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



/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .controls {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .controls input,
    .controls select,
    .controls button {
        min-width: 160px;
        font-size: 0.95rem;
        padding: 0.8rem 1.2rem;
    }
    
    #verseContainer {
        width: 98%;
        padding: 2rem;
        max-height: 55vh;
    }
    
    .surah-header h2 {
        font-size: 2rem;
    }
    
    .arabic-text {
        font-size: 1.3rem;
    }
    
    .surah-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 250px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .top-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-button.small {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-width: 120px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .verse-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .verse-controls {
        align-self: flex-end;
    }
    
    .controls {
        padding: 1rem;
    }
    
    .controls input,
    .controls select,
    .controls button {
        min-width: 140px;
        font-size: 0.9rem;
    }
}

/* Scrollbar styling */
#verseContainer::-webkit-scrollbar {
    width: 8px;
}

#verseContainer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#verseContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#verseContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}