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

body {
    font-family: 'Amiri', 'Traditional Arabic', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header h2 {
    font-size: 1.8em;
    font-weight: normal;
}

.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
}

.tab.active {
    background: white;
    border-bottom: 3px solid #2a5298;
    font-weight: bold;
}

.search-box {
    padding: 20px;
    background: #f9f9f9;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1.1em;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #2a5298;
}

.view {
    display: none;
    padding: 20px;
}

.view.active {
    display: block;
}

.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.surah-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.surah-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.surah-number {
    font-size: 2em;
    font-weight: bold;
    opacity: 0.8;
}

.surah-name {
    font-size: 1.5em;
    margin: 10px 0;
}

.surah-info {
    font-size: 0.9em;
    opacity: 0.9;
}

.juz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.juz-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    font-size: 1.3em;
    font-weight: bold;
}

.juz-card:hover {
    transform: scale(1.05);
}

.ayah-container {
    max-width: 900px;
    margin: 0 auto;
}

.ayah {
    background: #f9f9f9;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border-right: 4px solid #2a5298;
    line-height: 2;
    font-size: 1.4em;
}

.ayah-number {
    display: inline-block;
    background: #2a5298;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    margin: 0 10px;
    font-size: 0.8em;
}

.reader-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.reader-controls button {
    padding: 12px 30px;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
}

.reader-controls button:hover {
    background: #1e3c72;
    transform: scale(1.05);
}

.reader-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#pageInfo {
    font-size: 1.2em;
    font-weight: bold;
    color: #2a5298;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.3em;
    color: #666;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    header h2 {
        font-size: 1.3em;
    }

    .list-container {
        grid-template-columns: 1fr;
    }

    .ayah {
        font-size: 1.2em;
    }
}
