@import url('https://fonts.googleapis.com/css2?family=Droid+Arabic+Kufi:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.8;
}

html[lang="ar"] body {
    font-family: 'Droid Arabic Kufi', sans-serif;
    line-height: 2;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    text-align: center;
    color: white;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.language-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.lang-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.content {
    padding: 40px;
    font-size: 1.1em;
    color: #333;
}

.content h2 {
    color: #667eea;
    margin: 30px 0 20px 0;
    font-size: 1.8em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.content p {
    margin-bottom: 20px;
    text-align: justify;
    text-indent: 2em;
}

.content p:first-of-type {
    text-indent: 0;
}

/* التنقل بين المشاهد */
.scene-navigation {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    border-top: 2px solid #f0f0f0;
    gap: 15px;
}

.nav-btn {
    background: #667eea;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.nav-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-btn.index {
    background: #764ba2;
    flex: 0 0 auto;
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* فهرس الفصول */
.chapters-index {
    padding: 40px;
}

.chapters-index h2 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.chapter-item {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}

.chapter-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
}

.chapter-item a {
    color: #333;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
}

.chapter-item a:hover {
    color: #667eea;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .content {
        padding: 20px;
        font-size: 1em;
    }
    
    .lang-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .scene-navigation {
        flex-direction: column;
        padding: 20px;
    }
}