* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #0a0a0a;
    color: #c0c0c0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(40, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 20, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 8px;
    color: #8b8b8b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    position: relative;
    animation: fadeInDown 1s ease-out;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, #666, transparent);
}

.subtitle {
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 4px;
    font-style: italic;
    margin-top: 1rem;
    animation: fadeIn 1.5s ease-out;
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #222;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #666;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #999;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    flex: 1;
}

.category-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #222;
    padding: 2rem;
    position: relative;
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 100, 100, 0.1), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    border-color: #444;
    background: rgba(25, 25, 25, 0.8);
    transform: translateY(-2px);
}

.category-number {
    font-size: 0.8rem;
    color: #444;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.category-card h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #888;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.category-description {
    font-size: 0.85rem;
    color: #555;
    font-style: italic;
    line-height: 1.4;
}

.about-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    flex: 1;
}

.about-section {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #222;
    padding: 3rem;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    margin-bottom: 2rem;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 1rem;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 1px;
    background: linear-gradient(to right, transparent, #666, transparent);
}

.author-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #999;
    margin-bottom: 3rem;
}

.author-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.signature {
    text-align: right;
    font-style: italic;
    color: #666;
    margin-top: 2rem;
    font-size: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    color: #666;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 2px;
}

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #222;
    margin-top: auto;
}

.footer-text {
    font-size: 0.75rem;
    color: #444;
    letter-spacing: 2px;
}

/* Search Styles */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

.search-input {
    width: 100%;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #222;
    color: #999;
    padding: 1rem 1.5rem;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    outline: none;
}

.search-input::placeholder {
    color: #555;
    font-style: italic;
    letter-spacing: 2px;
}

.search-input:focus {
    border-color: #444;
    background: rgba(25, 25, 25, 0.8);
    color: #aaa;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #222;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    margin-top: -1px;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: rgba(30, 30, 30, 0.8);
    border-left: 2px solid #444;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    color: #888;
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.search-result-type {
    color: #555;
    font-size: 0.85rem;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-result-preview {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: #555;
    font-style: italic;
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle glitch effect on hover */
.category-card:hover h2 {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-1px, 1px);
    }
    40% {
        transform: translate(-1px, -1px);
    }
    60% {
        transform: translate(1px, 1px);
    }
    80% {
        transform: translate(1px, -1px);
    }
}

/* Admin Styles */
.admin-section {
    max-width: 900px;
    margin: 0 auto;
    flex: 1;
}

.login-box {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #222;
    padding: 3rem;
    margin-top: 3rem;
}

.admin-heading {
    font-size: 2rem;
    font-weight: 300;
    color: #888;
    margin-bottom: 2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid #222;
    color: #999;
    padding: 0.75rem;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #444;
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.admin-btn {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    color: #888;
    padding: 0.75rem 2rem;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: #555;
    color: #aaa;
}

.admin-btn.delete-btn {
    border-color: #400;
    color: #666;
}

.admin-btn.delete-btn:hover {
    background: rgba(40, 0, 0, 0.8);
    border-color: #600;
    color: #888;
}

.admin-btn.small-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.error-message {
    color: #666;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: italic;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #222;
    flex-wrap: wrap;
}

.admin-nav-btn {
    background: transparent;
    border: 1px solid #222;
    color: #666;
    padding: 0.5rem 1.5rem;
    font-family: 'Georgia', serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-nav-btn:hover,
.admin-nav-btn.active {
    border-color: #444;
    color: #999;
    background: rgba(30, 30, 30, 0.5);
}

.admin-nav-btn.logout {
    margin-left: auto;
    border-color: #300;
}

.admin-nav-btn.logout:hover {
    border-color: #500;
    background: rgba(30, 0, 0, 0.5);
}

.admin-content-section {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #222;
    padding: 2rem;
}

.admin-list {
    margin-top: 2rem;
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #222;
    margin-bottom: 1rem;
    background: rgba(10, 10, 10, 0.5);
    transition: all 0.3s ease;
}

.admin-list-item:hover {
    border-color: #333;
    background: rgba(15, 15, 15, 0.7);
}

.sort-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-right: 1rem;
}

.sort-btn {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #222;
    color: #666;
    width: 30px;
    height: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.sort-btn:hover:not(:disabled) {
    background: rgba(40, 40, 40, 0.9);
    border-color: #444;
    color: #999;
}

.sort-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.admin-hint {
    color: #555;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.list-item-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.list-item-number {
    color: #444;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    min-width: 40px;
}

.list-item-name {
    color: #888;
    font-size: 1.1rem;
    font-weight: 300;
    min-width: 150px;
}

.list-item-desc {
    color: #555;
    font-style: italic;
    font-size: 0.9rem;
}

.stats-edit {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-edit-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #222;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #666;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #999;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.admin-link {
    color: #444;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: #666;
}

/* Category Poems Display */
.category-poems-container {
    max-width: 1000px;
    margin: 0 auto 3rem;
    flex: 1;
}

.category-page-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
}

.category-description {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.poems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.poem-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #222;
    padding: 2rem;
    transition: all 0.4s ease;
    cursor: pointer;
}

.poem-card:hover {
    border-color: #444;
    background: rgba(25, 25, 25, 0.8);
    transform: translateY(-2px);
}

.poem-card-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #888;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.poem-card-preview {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.poem-card-link {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: inline-block;
}

.poem-card-link:hover {
    color: #888;
}

/* Poem Display Styles */
.poem-container {
    max-width: 900px;
    margin: 0 auto 3rem;
    flex: 1;
}

.poem-wrapper {
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3rem;
    position: relative;
    border: 1px solid #222;
}

.poem-wrapper.has-background {
    background-color: rgba(10, 10, 10, 0.3);
}

.poem-content-box {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #333;
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.poem-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.poem-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #999;
    text-align: left;
}

.poem-stanza {
    margin-bottom: 1.5rem;
    text-align: left;
}

.poem-stanza:last-child {
    margin-bottom: 0;
}

.poem-stanza strong {
    color: #aaa;
    font-weight: 600;
}

.poem-stanza em {
    color: #888;
    font-style: italic;
}

.poem-stanza u {
    color: #777;
    text-decoration: underline;
}

.poem-navigation {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

/* Admin Poem Styles */
.poems-controls {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.formatting-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid #222;
}

.format-btn {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    color: #888;
    padding: 0.5rem 1rem;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.format-btn:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: #555;
    color: #aaa;
}

.poem-editor {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.form-hint {
    display: block;
    color: #555;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.image-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid #222;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin-bottom: 1rem;
}

.large-modal .modal-content {
    max-width: 800px;
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .about-section {
        padding: 2rem;
    }

    .stats-edit {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        flex-direction: column;
    }

    .admin-nav-btn.logout {
        margin-left: 0;
    }

    .list-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .poem-wrapper {
        padding: 1.5rem;
    }

    .poem-content-box {
        padding: 2rem;
    }

    .poem-title {
        font-size: 2rem;
    }

    .poem-text {
        font-size: 1rem;
    }
}
