:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --primary: #FFBF00; /* Amber */
    --primary-hover: #E5AC00;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --error: #FF4B4B;
    --success: #4BB543;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

/* Auth Card */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="email"], input[type="text"] {
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    outline: none;
    background: rgba(0,0,0,0.4);
}

button {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* Grid Dokumentów */
.doc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.doc-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.doc-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.doc-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-download {
    padding: 0.6rem 1.2rem;
    background: rgba(255,191,0,0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: var(--primary);
    color: #000;
}

/* Alerty */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(255, 75, 75, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 75, 75, 0.2);
}

.alert-success {
    background: rgba(75, 181, 67, 0.1);
    color: var(--success);
    border: 1px solid rgba(75, 181, 67, 0.2);
}

/* Footer */
.reading-footer {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 6rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.reading-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-logo {
    height: 40px;
    width: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}
/* Section Switcher */
.zona-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.zona-nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}

.zona-nav-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.zona-nav-link.active {
    color: #000;
    background: var(--primary);
    border-color: var(--primary);
}

/* Evangelist Selection */
.evangelists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ev-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ev-card:hover, .ev-card.active {
    border-color: var(--primary);
    background: rgba(255, 191, 0, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.ev-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.ev-card:hover h3, .ev-card.active h3 {
    color: var(--primary);
}

/* Chapter Grid */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
}

.chapter-link {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
}

.chapter-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* Grouped List Style */
.chapter-group {
    margin-bottom: 2rem;
}

.chapter-badge {
    display: inline-block;
    background: var(--primary);
    color: #000;
    padding: 0.2rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.oredzia-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.oredzie-item-link {
    display: flex;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
}

.oredzie-item-link:hover {
    border-color: var(--primary);
    background: rgba(255,191,0,0.05);
    transform: translateX(5px);
}

.oredzie-item-link .icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.oredzie-item-link .title {
    flex: 1;
    font-weight: 500;
}

.oredzie-item-link .arrow {
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.oredzie-item-link:hover .arrow {
    opacity: 1;
}

/* Modal / Slide-over */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    font-size: 1.1rem;
}

.btn-close-modal {
    background: var(--glass);
    border: none;
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Markdown Content Styling inside Modal */
.modal-body h1 { margin-bottom: 1.5rem; color: var(--primary); }
.modal-body h2 { margin: 2rem 0 1rem; border-left: 4px solid var(--primary); padding-left: 1rem; }
.modal-body h3 { margin: 2rem 0 1rem; color: var(--primary); font-size: 1.2rem; }
.modal-body p { margin-bottom: 1.2rem; color: #ddd; }

.key-verse-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.key-verse-box:hover {
    transform: translateY(-8px) scale(1.01);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
    border-color: var(--primary);
}

.key-verse-box h3 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    border-left: none !important;
    padding-left: 0 !important;
}

.key-verse-box p {
    margin-bottom: 0 !important;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-main);
}

.modal-body blockquote { 
    background: rgba(255,191,0,0.05); 
    border-radius: 12px; 
    padding: 1.5rem; 
    font-style: italic; 
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
}
