/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #1a1a1a;
    --bg-medium: #2d2d2d;
    --bg-light: #3d3d3d;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent: #c9a227;
    --accent-hover: #dbb93a;
    --border-color: #444;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
}

/* Шапка */
header {
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    padding: 3rem 2rem 2rem;
    text-align: center;
    border-bottom: 2px solid var(--accent);
}

header h1 {
    font-size: 3rem;
    font-weight: normal;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Навигация */
nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.8rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
}

/* Основной контент */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: normal;
    letter-spacing: 0.15em;
}

/* Стихотворения */
.poem {
    background: var(--bg-medium);
    border-left: 3px solid var(--accent);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poem:hover {
    transform: translateX(5px);
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.3);
}

.poem h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: normal;
    font-style: italic;
}

.poem-text {
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.poem-text.collapsed {
    max-height: 150px;
}

.poem-text p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.poem-text p:empty {
    height: 1rem;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.toggle-btn:hover {
    color: var(--accent-hover);
}

/* Афоризмы */
.aphorisms-container {
    display: grid;
    gap: 1.5rem;
}

.aphorism {
    background: var(--bg-medium);
    padding: 2rem;
    border-radius: 5px;
    position: relative;
    transition: transform 0.3s ease;
}

.aphorism:hover {
    transform: scale(1.02);
}

.aphorism::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.aphorism p {
    font-size: 1.1rem;
    font-style: italic;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.aphorism cite {
    display: block;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.action-btn {
    display: block;
    margin: 2rem auto 0;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 1rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
}

.action-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.3);
}

/* О Ницше */
.about-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 600px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

.portrait {
    text-align: center;
}

.portrait-placeholder {
    width: 150px;
    height: 150px;
    background: var(--bg-light);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
    margin: 0 auto;
}

.bio p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.bio ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.bio li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.bio li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Подвал */
footer {
    background: var(--bg-medium);
    text-align: center;
    padding: 2rem;
    border-top: 2px solid var(--accent);
    margin-top: 3rem;
}

footer p:first-child {
    font-style: italic;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-medium);
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    border: 1px solid var(--accent);
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent);
}

#modal-quote {
    font-size: 1.3rem;
    font-style: italic;
    text-align: center;
    color: var(--text-primary);
}

/* Адаптивность */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }

    .nav-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .poem {
        padding: 1.5rem;
    }

    .aphorism {
        padding: 1.5rem;
    }
}

/* Скролл-бар */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Анимация появления элементов */
.poem,
.aphorism {
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

.poem:nth-child(1) { animation-delay: 0.1s; }
.poem:nth-child(2) { animation-delay: 0.2s; }
.poem:nth-child(3) { animation-delay: 0.3s; }
.poem:nth-child(4) { animation-delay: 0.4s; }
.poem:nth-child(5) { animation-delay: 0.5s; }

.aphorism:nth-child(1) { animation-delay: 0.1s; }
.aphorism:nth-child(2) { animation-delay: 0.15s; }
.aphorism:nth-child(3) { animation-delay: 0.2s; }
.aphorism:nth-child(4) { animation-delay: 0.25s; }
.aphorism:nth-child(5) { animation-delay: 0.3s; }
.aphorism:nth-child(6) { animation-delay: 0.35s; }
.aphorism:nth-child(7) { animation-delay: 0.4s; }
.aphorism:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Выделение текста */
::selection {
    background: var(--accent);
    color: var(--bg-dark);
}
