:root {
    --quran-green: #1b5e20; /* The dark green from your image */
    --light-bg: #f5f5f5;
    --text-main: #333;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    color: var(--text-main);
}

header {
    background-color: var(--quran-green);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

header h1 { margin: 0; font-size: 2.5rem; }
header p { opacity: 0.9; font-weight: 300; }

.container {
    max-width: 900px;
    margin: -30px auto 50px; /* Overlaps header slightly like the image */
    padding: 0 20px;
}

/* The White Info Card (The 70% Secret) */
.info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Accordion Styling */
.tier-accordion {
    background: white;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tier-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.tier-header:hover { background-color: #fafafa; }

.tier-header .plus-icon { color: var(--quran-green); font-size: 1.5rem; }

/* Dictionary Grid inside the accordion */
.batch-content {
    display: none; /* Hidden by default */
    padding: 20px;
    background: #fff;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.root-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
}
/* Batch styling inside Tier */
.batch-wrapper {
    background: #f9f9f9;
    border-left: 3px solid var(--quran-green);
    margin: 5px 20px;
    border-radius: 4px;
}

.batch-header {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
}

/* The Word List Table */
.word-list-container {
    display: none; /* Hidden until batch is clicked */
    padding: 0;
    background: white;
}

.word-row {
    display: grid;
    grid-template-columns: 80px 150px 1fr;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.word-row:last-child { border-bottom: none; }

.word-arabic { font-size: 1.2rem; font-weight: bold; color: var(--quran-green); }
.word-urdu { color: #c0392b; font-weight: 600; }
.word-meanings { font-size: 0.85rem; color: #666; }

.word-row {
    display: grid;
    grid-template-columns: 80px 100px 180px 1fr; /* Added one more column */
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

/* Container for the whole word entry */
.word-row-container {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.word-row-container:hover {
    background-color: #f9fdf9; /* Very light green on hover */
}

/* The top line with Arabic and Urdu */
.word-row {
    display: grid;
    grid-template-columns: 80px 100px 200px 1fr;
    align-items: center;
    margin-bottom: 8px;
}

.word-arabic-root { font-size: 0.85rem; color: #999; }
.word-arabic-script { font-size: 1.4rem; font-weight: bold; color: #1b5e20; }
.word-urdu { color: #c0392b; font-weight: 600; font-family: 'Urdu Typesetting', serif; }
.word-meanings { font-weight: 500; color: #333; }

/* The Bridge Text styling */
.word-bridge {
    font-size: 0.9rem;
    color: #555;
    background: #f1f8e9; /* Light green highlight */
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.4;
    border-left: 3px solid #81c784;
}
.word-urdu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.urdu-pair {
    display: inline-flex;
    flex-direction: row-reverse; /* Shows script then roman */
    align-items: center;
    gap: 5px;
    background: #fdfdfd;
    padding: 2px 8px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.u-script {
    font-family: 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif;
    font-size: 1.3rem;
    color: #c0392b;
}

.u-roman {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
}