/* style.css */
/* Base styles with gothic/dark aesthetic */
body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 20px;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(40, 0, 30, 0.3) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 20, 40, 0.3) 0%, transparent 20%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23333" stroke-width="0.5" opacity="0.3"/></svg>');
    background-size: auto, auto, 20px 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* CRT scanline effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    animation: scan 8s linear infinite;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(10, 5, 15, 0.85);
    border: 1px solid #333;
    box-shadow: 0 0 15px rgba(100, 0, 50, 0.3);
    position: relative;
}

/* Header styles with Silent Hill-inspired fog effect */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    position: relative;
    border-bottom: 1px solid #444;
}

.fog {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, 
        rgba(100, 100, 120, 0.1) 0%, 
        rgba(50, 50, 70, 0.3) 100%);
    filter: blur(5px);
    animation: fog-move 30s linear infinite;
}

@keyframes fog-move {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 0; }
}

h1 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 42px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #b00;
    text-shadow: 0 0 5px rgba(180, 0, 0, 0.5);
    margin: 0;
    position: relative;
    z-index: 2;
}

h1 span {
    display: inline-block;
    transition: all 0.3s;
}

h1 span:hover {
    color: #f00;
    transform: translateY(-2px);
}

/* Navigation with search */
nav {
    margin: 20px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav li {
    margin: 5px 10px;
}

nav a {
    color: #c0c0c0;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s;
}

nav a.active, nav a:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

.search-box {
    display: flex;
    margin: 5px 0;
}

#search-input {
    background: #111;
    color: #ccc;
    border: 1px solid #333;
    padding: 5px 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    width: 180px;
    transition: all 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #b00;
    box-shadow: 0 0 8px rgba(180, 0, 0, 0.5);
}

#search-btn {
    background: #222;
    color: #ccc;
    border: 1px solid #333;
    padding: 5px 15px;
    margin-left: 5px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    transition: all 0.3s;
}

#search-btn:hover {
    background: #333;
    border-color: #b00;
    color: #fff;
}

/* Main content styles */
.content-section {
    padding: 20px;
    border: 1px dashed #444;
    margin-bottom: 30px;
    background-color: rgba(15, 10, 20, 0.6);
    position: relative;
}

/* Gothic separator */
.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: "✝";
    color: #666;
    font-size: 24px;
    position: relative;
    top: -10px;
    background: #0a0a0a;
    padding: 0 15px;
    z-index: 2;
}

.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #444, transparent);
    z-index: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #333;
    position: relative;
    margin-top: 20px;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Template-specific styles */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-item {
    border: 1px solid #333;
    overflow: hidden;
    position: relative;
    background: #111;
    transition: all 0.3s;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(100, 0, 0, 0.3);
}

.photo-placeholder {
    height: 150px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.photo-placeholder::before {
    content: "PHOTO";
    color: #444;
    font-size: 12px;
    letter-spacing: 2px;
}

.photo-title {
    padding: 10px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
}

.photo-date {
    padding: 5px 10px;
    font-size: 11px;
    color: #666;
    text-align: center;
    background: rgba(10, 10, 10, 0.8);
}

.story, .poem {
    background: rgba(20, 15, 25, 0.7);
    padding: 20px;
    margin: 20px 0;
    border-left: 3px solid #b00;
    transition: all 0.3s;
}

.story:hover, .poem:hover {
    background: rgba(30, 20, 35, 0.8);
    border-left: 3px solid #f00;
}

.story-title, .poem-title {
    color: #c99;
    margin-top: 0;
    border-bottom: 1px dashed #444;
    padding-bottom: 10px;
}

.story-meta, .poem-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.poem {
    font-style: italic;
    line-height: 1.8;
    text-align: center;
}

.poem-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.story-list .story {
    margin-bottom: 40px;
}

.about-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.about-image {
    flex: 1;
}

.about-text {
    flex: 2;
}

.image-placeholder {
    height: 200px;
    background: #1a0a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
}

.image-placeholder::before {
    content: "IMAGE";
    color: #444;
    font-size: 14px;
    letter-spacing: 2px;
}

.about-text ul {
    padding-left: 20px;
}

.about-text li {
    margin-bottom: 10px;
    position: relative;
}

.about-text li::before {
    content: "■";
    color: #b00;
    position: absolute;
    left: -20px;
}

/* Analog horror distortion overlay */
.distortion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.05;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.8"/></svg>');
    animation: distort 20s infinite linear;
}

@keyframes distort {
    0% { transform: translate(0,0); }
    10% { transform: translate(-5px,5px); }
    20% { transform: translate(5px,-5px); }
    30% { transform: translate(-3px,3px); }
    40% { transform: translate(2px,-2px); }
    50% { transform: translate(4px,4px); }
    60% { transform: translate(-2px,-2px); }
    70% { transform: translate(3px,3px); }
    80% { transform: translate(-4px,-4px); }
    90% { transform: translate(1px,1px); }
    100% { transform: translate(0,0); }
}

/* Vintage button style */
.btn {
    display: inline-block;
    background: #222;
    color: #ccc;
    border: 1px solid #444;
    padding: 5px 15px;
    margin: 10px 5px 0 0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn:hover {
    background: #333;
    border-color: #b00;
    color: #fff;
    box-shadow: 0 0 10px rgba(180, 0, 0, 0.5);
}

/* Responsive design */
@media (max-width: 700px) {
    .about-content {
        flex-direction: column;
    }
    
    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        width: 100%;
        margin-top: 10px;
    }
    
    #search-input {
        width: 100%;
    }
    
    h1 {
        font-size: 32px;
    }
}