:root {
    --bg-primary: #faf8f3;
    --bg-secondary: rgba(245, 243, 238, 0.9);
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #2d2520;
    --text-secondary: #6b6158;
    --accent-primary: #a89968;
    --accent-gradient: linear-gradient(135deg, #c9a961, #a89968);
    --angry-gradient: linear-gradient(135deg, #d4574a, #b8453a);
    --funny-gradient: linear-gradient(135deg, #d4a574, #b8894a);
    --personal-gradient: linear-gradient(135deg, #b8a89c, #a89968);
    --inspirational-gradient: linear-gradient(135deg, #9db8a8, #7d9878);
    --blur-amount: 10px;
    --sidebar-width: 240px;
    --header-height: 60px;
}

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

body {
    font-family: 'Georgia', 'Garamond', serif;
    line-height: 1.8;
    background: linear-gradient(135deg, #faf8f3, #f5f3ee);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    position: relative;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(201, 169, 97, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 15s ease-in-out infinite;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-right: 1px solid rgba(169, 153, 136, 0.2);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 2rem;
}

@keyframes pulse {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-5%, -5%); }
    100% { transform: translate(0, 0); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.logo h1 {
    font-size: 1.8rem;
    text-align: center;
    margin: 0 0 2rem;
    padding: 0 1rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--accent-gradient);
    margin: 0.5rem auto;
    border-radius: 2px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.menu-item {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-item:hover {
    background: rgba(201, 169, 97, 0.15);
    color: var(--text-primary);
}

.menu-item.active {
    background: rgba(201, 169, 97, 0.25);
    color: var(--text-primary);
    border: 1px solid #c9a961;
}

.menu-icon {
    font-size: 1.2em;
    width: 1.5em;
    text-align: center;
}

.poems {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1rem 0;
    justify-content: center;
}

.poem {
    background: var(--bg-card);
    padding: 1.0rem;
    border-radius: 15px;
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    width: fit-content;
    min-width: 300px;
    max-width: 600px;
    flex: 1 1 auto;
}

.poem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.poem:hover::before {
    transform: scaleX(1);
}

.poem:hover {
    transform: translateY(-5px);
}

.poem h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.2em;
}

.poem-content {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    white-space: normal;
    word-wrap: break-word;
}

.poem-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.poem-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85em;
    background: rgba(201, 169, 97, 0.15);
    color: #8b7355;
    border: 1px solid rgba(201, 169, 97, 0.3);
    transition: all 0.3s ease;
}

.poem-tag:hover {
    background: rgba(201, 169, 97, 0.25);
    color: #6b5344;
    border: 1px solid #c9a961;
}

.intro-section {
    padding: 3rem 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.search-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.search-button {
    padding: 0.8rem 1.5rem;
    background: rgba(201, 169, 97, 0.2);
    border: 1px solid #c9a961;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: rgba(201, 169, 97, 0.3);
}

.poem-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.intro-title {
    font-size: 2em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

.code-block {
    background: rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 400px;
    text-align: left;
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.code-block pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.poem-detail {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #c9a961;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.poem-full {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.poem-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.poem-full-content {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-primary);
    margin-bottom: 2rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.section-title {
    font-size: 2em;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(201, 169, 97, 0.3);
    color: var(--text-primary);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem;
    z-index: 102;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar.mobile-open {
    transform: translateX(0);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.sidebar-backdrop.active {
    display: block;
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

    .hamburger {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 102;
    }

    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 101;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .logo {
        padding-top: 3rem;
    }

    .logo h1 {
        font-size: 1.5rem;
        margin: 0 0 1rem;
    }

    .menu {
        padding: 0 1rem 1rem;
    }

    .main-content {
        margin-left: 0;
        padding: 4rem 1rem 1rem;
        margin-top: 0;
        width: 100%;
    }

    .intro-title { font-size: 1.5em; }
    .intro-subtitle { font-size: 1em; }
    .section-title { font-size: 1.5em; }
    .poem { padding: 1.5rem; }
    .poem h3 { font-size: 1.3em; }
}

@media (max-width: 480px) {
    .poems { 
        padding: 1rem;
        gap: 1rem;
    }
    .poem { 
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 1rem;
    }
    .intro-section {
        padding: 1rem 0;
    }
    .code-block {
        max-width: 100%;
        padding: 1rem;
    }
    .search-form {
        flex-direction: column;
    }
    .search-input,
    .search-button {
        width: 100%;
    }
    .poem-full {
        padding: 1.5rem;
    }
    .poem-title {
        font-size: 1.8rem;
    }
    .poem-full-content {
        font-size: 1rem;
        line-height: 1.8;
    }
}
