* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5ecd9;
    color: #4b3f2f;
    margin: 0;
    font-size: 0.95rem;
}

header {
    text-align: center;
}

header h1 {
    margin-top: 0.5rem;
    font-size: 1.6rem;
    color: #3d2f1c;
}

.container {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.filters {
    background-color: #f2e3c6;
    padding: 1rem;
    border-radius: 10px;
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 500px) {
    .filter-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .filter-group {
        flex: 1 1 30%;
        min-width: 150px;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

select {
    padding: 0.4rem;
    border-radius: 6px;
    border: 1px solid #cbb89c;
    background-color: #fff8e7;
    font-size: 0.9rem;
    height: 1.9rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.generate-button {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #4b3f2f;
    background-color: transparent;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s, border-color 0.3s;
}

.generate-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.5);
}

.verse-display {
    background-color: #f2e3c6;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.verse-box {
    padding: 0.6rem;
    background-color: #fff8e7;
    border-radius: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
}

.eye-stack {
    position: absolute;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 10;
    color: #4b3f2f;
}

.stack-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.eye-icon {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #4b3f2f;
}

.verse-box span {
    margin-left: 2rem;
}

footer {
    text-align: center;
    padding: 0.5rem 0;
    background-color: #f5ecd9;
    font-size: 0.8rem;
    color: #7c6a52;
    border-top: 1px solid #e2d6bf;
    margin-top: 2rem;
}

.verse-information {
    padding: 0.3rem 0;
}

#verse-text {
    padding-top: 0.5rem;
    padding-bottom: 0rem;
    margin: 0;
}

.dropdown-style-button {
    padding: 0.4rem;
    border-radius: 6px;
    border: 1px solid #b49a7e;
    background-color: #f2e1c3;
    font-size: 0.9rem;
    color: #4b3f2f;
    width: 100%;
    cursor: pointer;
    height: 1.9rem;
    box-sizing: border-box;
    transition: background-color 0.3s, border-color 0.3s;
}

.dropdown-style-button:hover {
    background-color: #e4cfb2;
    border-color: #a7896d;
}

.close-help-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: none;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
    color: #4b3f2f;
    cursor: pointer;
}

#help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

#help-modal > div {
    background: #fff8e7;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b3f2f;
}

#help-content h2 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: bold;
    color: #3d2f1c;
}

#help-content p,
#help-content ul {
    margin: 0.5rem 0 0;
}

#help-content ul {
    padding-left: 1.2rem;
    list-style: disc;
}

#help-modal .help-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

#help-modal button {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #cbb89c;
    background-color: #f2e1c3;
    color: #4b3f2f;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#help-modal button:disabled {
    opacity: 0.5;
    cursor: default;
}

#help-page-indicator {
    font-size: 0.9rem;
    color: #4b3f2f;
}

.help-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

.header-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.header-buttons button,
.header-buttons select {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border: 1px solid #cbb89c;
    background-color: #f2e1c3;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 500px) {
    .header-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        margin: 0 auto;
        padding: 0.5rem;
    }

    .header-buttons button,
    .header-buttons select {
        flex: 1 1 auto;
        max-width: 100px;
    }

    body {
        transform: scale(0.9);
        transform-origin: top;
        }

    header h1 {
        font-size: 1.4rem;
        margin-top: 0.5rem;
    }

    select, .dropdown-style-button {
        height: 1.9rem;
        font-size: 0.85rem;
    }

    .generate-button {
        padding: 0.5rem;
    }

    .verse-box {
        font-size: 0.9rem;
        min-height: 50px;
        padding: 0.5rem;
    }

    footer {
        padding: 0.5rem;
    }
}

.page-wrapper {
    max-width: 100%;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


footer {
  background-color: #f5ecd9;
  padding: 1rem 0;
  margin-top: auto;
  text-align: center;
  border-top: none;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #7c6a52;
    border-top: 1px solid #e2d6bf;
}

.content-width {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

.help-nav.rtl {
    flex-direction: row-reverse;
}

.controls-section.rtl {
    direction: rtl;
    text-align: right;
}

.controls-section.rtl label,
.controls-section.rtl select {
    text-align: right;
}

select.rtl {
    direction: rtl;
    text-align: right;
    background-position: left center;
}

#help-button,
#lang-toggle {
    width: 100px;
    height: 1.9rem;
}

.verse-info-box {
    background-color: transparent;
    padding: 0;
    min-height: auto;
}

.verse-info-box span {
    margin: 0;
}

.verse-info-box #verse-text {
    margin: 0;
    text-align: center;
}

.verse-info-box .eye-stack {
    padding-top: 1rem;
}
