/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #000;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link {
    text-decoration: none;
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    color: #fff;
    background: #000;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #fff;
    background: #000;
    font-weight: 600;
}

/* Main content */
.fragment-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.fragment-content {
    text-align: center;
    margin-bottom: 2rem;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid #000;
}

.fragment-text {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #000;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.fragment-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #000;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #000;
}

.language {
    text-transform: uppercase;
    font-weight: bold;
    color: #000;
}

.themes {
    font-style: italic;
    color: #000;
}

.date {
    color: #000;
}

/* Controls */
.fragment-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #000;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #000;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Section descriptions */
.section-description {
    max-width: 600px;
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 6px;
    border: 2px solid #000;
}

.section-description h2 {
    color: #000;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-description p {
    color: #000;
    line-height: 1.6;
}

/* Content pages */
.content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.about-content,
.contact-content,
.faq-content,
.privacy-content,
.attribution-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid #000;
    width: 100%;
}

.about-content h1,
.contact-content h1,
.faq-content h1,
.privacy-content h1,
.attribution-content h1 {
    color: #000;
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
}

.about-section,
.contact-section,
.faq-section,
.privacy-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
}

.about-section:last-child,
.contact-section:last-child,
.faq-section:last-child,
.privacy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.about-section h2,
.contact-section h2,
.faq-section h2,
.privacy-section h2 {
    color: #000;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-section h3,
.contact-section h3,
.faq-section h3,
.privacy-section h3 {
    color: #000;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.about-section p,
.contact-section p,
.faq-section p,
.privacy-section p {
    color: #000;
}

.about-section ul,
.contact-section ul,
.faq-section ul,
.privacy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-section li,
.contact-section li,
.faq-section li,
.privacy-section li {
    margin-bottom: 0.5rem;
    color: #000;
}

.contact-link {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #000;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #333;
    border-bottom-color: #333;
    background: #f0f0f0;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #000;
    font-size: 0.8rem;
    border-top: 2px solid #000;
    background: #fff;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .fragment-text::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "..."; }
    40% { content: "...."; }
    60% { content: "....."; }
    80%, 100% { content: "......"; }
}

/* Pair fragments */
.pair-fragment {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fragment-1,
.fragment-2 {
    font-style: italic;
    line-height: 1.6;
    color: #000;
}

.fragment-separator {
    font-size: 1.2rem;
    color: #666;
    margin: 0.5rem 0;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }