/* Base styles */
body {
    background-color: #1f1f1f;
    font-family: PT Serif, serif;
    color: #ffffff;
    margin: 0;
    padding: 20px;
    min-width: 320px;
}

/* Main container */
.container {
    width: 1200px;
    max-width: calc(100vw - 40px);
    margin: 0 auto;
    background-color: #2a2a2a;
    border: 3px outset #666666;
    padding: 0;
    transform-origin: top center;
}

/* Header section */
.header {
    background-color: #2c2c2c;
    background-image: linear-gradient(45deg, #2c2c2c 25%, #003566 25%, #363636 50%, #4e0066 50%, #2c2c2c 75%, #3c3c3c 75%);
    background-size: 12px 12px;
    border: 2px solid #69cfff;
    border-bottom: none;
    padding: 15px;
    text-align: center;
    font-family: Xanh Mono, monospace;
    font-size: 150%;
    animation: moving-background 1s linear infinite;
    text-shadow: 0 0 8px rgba(105, 207, 255, 0.6), 0 0 4px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(105, 207, 255, 0.1) 20%, 
        rgba(255, 105, 207, 0.1) 50%, 
        rgba(105, 207, 255, 0.1) 80%, 
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes moving-background {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 24px 24px;
    }
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    50% {
        transform: translateX(50%);
        opacity: 1;
    }
}

/* Navigation section */
.navigation-section {
    background-color: #444444;
    border: 2px solid #69cfff;
    border-top: none;
    border-bottom: 1px solid #69cfff;
    padding: 10px 20px;
    font-family: PT Mono, monospace;
}

.navigation {
    display: flex;
    justify-content: center;
}

.navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.navigation li {
    border: 1px outset #666666;
    padding: 3px 8px;
    background-color: #555555;
    transition: all 0.2s ease;
}

.navigation li:hover {
    background-color: #666666;
    border: 1px inset #666666;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #69cfff 20%, #ff69cf 50%, #69cfff 80%, transparent);
    margin: 20px auto 30px auto;
    width: 60%;
    box-shadow: 0 0 4px rgba(105, 207, 255, 0.3);
}

/* Main content */
.main-content {
    background-color: #2c2c2c;
    border: 2px solid #69cfff;
    border-top: 1px solid #69cfff;
    border-bottom: 1px solid #69cfff;
    padding: 20px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 300px;
}

/* Poetry content */
.main-content-poem {
    background-color: #2c2c2c;
    border: 2px solid #69cfff;
    border-top: 1px solid #69cfff;
    border-bottom: 1px solid #69cfff;
    padding: 30px;
    font-size: 20px;
    line-height: 1.6;
    min-height: 400px;
    text-align: center;
    font-family: PT Serif, serif;
}

.main-content-poem h1 {
    color: #69cfff;
    font-family: Xanh Mono, monospace;
    font-size: 200%;
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(105, 207, 255, 0.4);
}

.main-content-poem .poem-desc {
    color: #cccccc;
    font-family: PT Serif, monospace;
    font-size: 90%;
    font-style: normal;
    margin: 0 auto 15px auto;
    max-width: 500px;
    text-align: center;
    opacity: 0.8;
}

.main-content-poem hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #69cfff 20%, #ff69cf 50%, #69cfff 80%, transparent);
    margin: 20px auto 30px auto;
    width: 60%;
    box-shadow: 0 0 4px rgba(105, 207, 255, 0.3);
}

.main-content-poem p {
    max-width: 600px;
    margin: 0 auto 20px auto;
    color: #e0e0e0;
    text-align: left;
}

/* Bold and italic styling for poetry */
.main-content-poem strong {
    color: #69cfff;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(105, 207, 255, 0.3);
}

.main-content-poem em {
    color: #ff69cf;
    font-style: italic;
    text-shadow: 0 0 4px rgba(255, 105, 207, 0.2);
}

/* Text content */
.main-content-text {
    background-color: #2c2c2c;
    border: 2px solid #69cfff;
    border-top: none;
    border-bottom: none;
    padding: 30px;
    font-size: 18px;
    line-height: 1.6;
    min-height: 400px;
    text-align: center;
    font-family: PT Serif, serif;
}

.main-content-text h1 {
    color: #69cfff;
    font-family: Xanh Mono, monospace;
    font-size: 200%;
    margin-bottom: 25px;
    text-shadow: 0 0 6px rgba(105, 207, 255, 0.4);
    text-align: center;
}

.main-content-text h2, .main-content-text h3 {
    color: #ff69cf;
    font-family: Xanh Mono, monospace;
    margin-top: 30px;
    margin-bottom: 15px;
}

.main-content-text h2 {
    font-size: 150%;
}

.main-content-text h3 {
    font-size: 120%;
}

.main-content-text p {
    max-width: 600px;
    margin: 0 auto 20px auto;
    color: #e0e0e0;
    text-align: left;
}

.main-content-text a {
    color: #69cfff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-content-text ul {
    margin: 20px auto;
    padding-left: 0;
    max-width: 600px;
    text-align: left;
    list-style: none;
}

.main-content-text ul li {
    margin-bottom: 10px;
    color: #e0e0e0;
    position: relative;
    padding-left: 20px;
}

.main-content-text ul li::before {
    content: "▸ ";
    color: #69cfff;
    position: absolute;
    left: 0;
    top: 0;
}

.main-content-text ul li:hover {
    color: #ffffff;
    transition: color 0.2s ease;
}

.box {
    background-color: #2c2c2c;
    background-image: linear-gradient(45deg, #2c2c2c 25%, #003566 25%, #363636 50%, #4e0066 50%, #2c2c2c 75%, #3c3c3c 75%);
    background-size: 4px 4px;
    border: 2px solid #69cfff;
    padding: 5px 5px 5px 15px;
    text-align: left;
    font-family: PT Serif, serif;
    font-size: 100%;
    line-height: 1;
    transition: all 0.25s ease-out;
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: none;
}

.box h3 {
    font-family: Xanh Mono, serif;
    font-size: 150%;
}

.box:hover {
    background-color: #4a1a5c;
    background-image: none;
    border: 2px solid #ff69cf;
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 6px 12px rgba(105, 207, 255, 0.4), 0 3px 6px rgba(255, 105, 207, 0.3);
    animation: gentle-glow 1.2s ease-in-out infinite;
}

@keyframes gentle-glow {
    0%, 100% {
        box-shadow: 0 6px 12px rgba(105, 207, 255, 0.4), 0 3px 6px rgba(255, 105, 207, 0.3);
    }
    50% {
        box-shadow: 0 8px 16px rgba(105, 207, 255, 0.6), 0 4px 8px rgba(255, 105, 207, 0.5);
    }
}

/* Links for boxes */
a {
    color: inherit;
    text-decoration: none;
}

a .box {
    color: #ffffff;
}

a .box h3 {
    color: #69cfff;
}

/* Footer */
.footer {
    background-color: #2c2c2c;
    border: 2px solid #69cfff;
    border-top: none;
    padding: 10px;
    text-align: center;
    font-size: 15px;
    color: #cccccc;
    font-family: PT Mono, monospace;
}

.footer a {
    color: #69cfff;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Links */
.navigation a {
    color: #69cfff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navigation a:hover {
    color: #ff69cf;
}

/* Responsive design */
@media (max-width: 840px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: calc(100vw - 20px);
        transform: scale(calc((100vw - 20px) / 800));
        margin-bottom: calc((800px * (1 - (100vw - 20px) / 800)) * 0.7);
    }
}

@media (max-width: 480px) {
    .container {
        transform: none;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin-bottom: 0;
    }
    
    .header {
        font-size: 100%;
        padding: 8px;
    }
    
    .navigation-section {
        padding: 6px 12px;
    }
    
    .navigation ul {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .navigation li {
        padding: 4px 8px;
        font-size: 85%;
    }
    
    .main-content {
        padding: 12px;
        font-size: 14px;
    }
    
    .main-content-poem {
        padding: 15px;
        font-size: 16px;
        line-height: 1.4;
    }
    
    .main-content-poem h1 {
        font-size: 150%;
        margin-bottom: 15px;
    }
    
    .main-content-poem .poem-desc {
        font-size: 85%;
        margin-bottom: 10px;
    }
    
    .main-content-poem hr {
        margin: 15px auto 20px auto;
    }
    
    .main-content-poem p {
        margin: 0 auto 15px auto;
        font-size: 95%;
    }
    
    .box {
        padding: 4px 4px 4px 12px;
        font-size: 90%;
    }
    
    .box h3 {
        font-size: 130%;
    }
    
    .footer {
        padding: 8px;
        font-size: 13px;
    }
}