:root {
    --bg-color: #e6e2d3;
    --card-bg: #fffbf0;
    --text-color: #2b2218;
    --accent-color: #c5a059;
    --gold-border: #d4af37;
    --verse-num-color: #a67c00;
    --hover-bg: rgba(197, 160, 89, 0.05);
}

/* איפוס בסיסי */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    /* טקסטורה עדינה לרקע */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23bfae90' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    font-family: 'Amiri', 'Frank Ruhl Libre', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    color: var(--text-color);
}

.container {
    background-color: var(--card-bg);
    max-width: 850px;
    width: 100%;
    padding: 50px 60px 40px;
    position: relative;
    
    /* אפקט תלת מימד */
    box-shadow: 
        0 1px 1px rgba(0,0,0,0.15), 
        0 10px 0 -5px #eee, 
        0 10px 1px -4px rgba(0,0,0,0.15), 
        0 20px 0 -10px #eee, 
        0 20px 1px -9px rgba(0,0,0,0.15),
        0 0 40px rgba(0,0,0,0.1);
    
    border-radius: 2px;
    overflow: hidden;
}

/* מסגרת דקורטיבית פנימית */
.inner-border {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    pointer-events: none;
    z-index: 0;
}

.inner-border::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 2px;
}

/* פינות מעוטרות */
.corner-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--gold-border);
    z-index: 1;
}
.top-left { top: 25px; left: 25px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.top-right { top: 25px; right: 25px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.bottom-left { bottom: 25px; left: 25px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.bottom-right { bottom: 25px; right: 25px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.top-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    margin: 0;
    font-size: 0.85rem;
    z-index: 10;
}

.top-nav a {
    text-decoration: none;
    color: #8a7b68;
    border: 1px solid #dcd3c5;
    padding: 5px 12px;
    border-radius: 20px;
    background: #fff;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-nav a:hover {
    color: var(--verse-num-color);
    border-color: var(--accent-color);
    background: #fffbf0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
    background: -webkit-linear-gradient(45deg, #1a1a1a, #4a3b2a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* קו מפריד מעוטר */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto 0;
    color: var(--accent-color);
}
.divider::before, .divider::after {
    content: '';
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
    width: 80px;
    margin: 0 10px;
}
.divider span {
    font-size: 1.5rem;
}

.psalm-content {
    font-size: 1.9rem;
    line-height: 1.5;
    text-align: justify;
    text-align-last: center;
    position: relative;
    z-index: 2;
}

.verse {
    margin-bottom: 3px;
    padding: 5px 15px;
    border-radius: 8px;
    transition: background-color 0.4s ease;
    position: relative;
}

.verse:hover {
    background-color: var(--hover-bg);
    cursor: default;
}

/* מספרי הפסוקים */
.verse-num {
    color: var(--verse-num-color);
    font-weight: 700;
    margin-left: 5px;
    font-size: 1rem;
    vertical-align: middle;
    position: relative;
    top: -2px;
    border: 1px solid rgba(197, 160, 89, 0.5);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    font-family: 'Frank Ruhl Libre', serif;
}

.holy-name {
    font-weight: 700;
    color: #5d4037;
}

.footer {
    margin-top: 15px;
    text-align: center;
    font-size: 0.95rem;
    color: #8a7b68;
    position: relative;
    z-index: 2;
}

.footer::before {
    content: "✦";
    display: block;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 1.2rem;
    opacity: 0.6;
}

.footer p {
    margin-bottom: 4px;
}

.footer-links {
    margin: 12px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #8a7b68;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    right: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.footer-links a:hover {
    color: var(--text-color);
}

.footer-links a:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

.ai-disclaimer {
    font-size: 0.75rem;
    margin-top: 15px;
    opacity: 0.7;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 10px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* התאמה למובייל */
/* נגישות - סימון מיקוד למקלדת */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(197, 160, 89, 0.3);
}

/* Enhanced focus for keyboard navigation mode */
body.keyboard-nav a:focus,
body.keyboard-nav button:focus {
    outline: 3px solid var(--gold-border) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.35) !important;
}

body.keyboard-nav .top-nav a:focus,
body.keyboard-nav .footer-links a:focus,
body.keyboard-nav .nav-btn:focus {
    outline: 3px solid #fff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px var(--gold-border), 0 0 15px rgba(212, 175, 55, 0.5) !important;
    background: var(--gold-border) !important;
    color: #fff !important;
}

/* דילוג לתוכן עיקרי */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    z-index: 1000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 8px 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 40px 25px;
    }
    .inner-border {
        top: 10px; bottom: 10px; left: 10px; right: 10px;
    }
    .corner-decoration {
        width: 25px; height: 25px;
        top: 18px; left: 18px;
    }
    .top-right { right: 18px; left: auto; }
    .bottom-left { top: auto; bottom: 18px; }
    .bottom-right { top: auto; bottom: 18px; right: 18px; left: auto; }

    h1 {
        font-size: 2.8rem;
    }
    .psalm-content {
        font-size: 1.5rem;
        line-height: 1.7;
        text-align: right;
        text-align-last: right;
    }
    .verse-num {
        float: right;
        margin-left: 10px;
        margin-top: 5px;
    }

    .footer {
        margin-top: 10px;
        font-size: 0.75rem;
    }

    .footer::before {
        margin-bottom: 5px;
        font-size: 1rem;
    }

    .footer p {
        margin-bottom: 2px;
    }

    .footer-links {
        margin: 8px 0;
        gap: 10px;
        flex-wrap: wrap;
    }

    .footer-links a {
        font-size: 0.75rem;
        padding: 2px 4px;
    }

    .ai-disclaimer {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
    }
}