:root {
    --primary-color: #10B981;
    /* Emerald 500 */
    --primary-dark: #059669;
    /* Emerald 600 */
    --background-color: #F8FAFC;
    /* Slate 50 */
    --card-background: #FFFFFF;
    --text-primary: #1E293B;
    /* Slate 800 */
    --text-secondary: #64748B;
    /* Slate 500 */
    --arabic-font: 'Amiri', serif;
    --latin-font: 'Inter', sans-serif;
}

/* Dark Mode Variables (Anthracite/Dark Grey) */
.dark-mode {
    --background-color: #121212;
    /* Very dark grey, almost black */
    --card-background: #1E1E1E;
    /* Dark grey for card */
    --text-primary: #E2E8F0;
    /* Light grey for text */
    --text-secondary: #94A3B8;
    /* Muted light grey */
    --primary-color: #34D399;
    /* Lighter Emerald for better contrast */
    --primary-dark: #10B981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--latin-font);
    background-color: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.card {
    background: var(--card-background);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: transform 0.3s ease;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.surah-name {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.arabic-text {
    font-family: var(--arabic-font);
    font-size: 2.5rem;
    line-height: 1.8;
    text-align: center;
    direction: rtl;
    color: var(--text-primary);
    margin: 10px 0;
}

.translation-text {
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: center;
    color: var(--text-secondary);
}

.controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.next-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.next-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.3);
}

.next-button:active {
    transform: translateY(0);
}

.footer {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-background);
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.theme-toggle:hover {
    opacity: 1;
    transform: scale(1.05);
}

.loading {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Animations */
.content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .card {
        padding: 24px;
        gap: 20px;
    }

    .arabic-text {
        font-size: 2rem;
    }

    .translation-text {
        font-size: 1rem;
    }
}