/* CSS Reset for better cross-browser compatibility */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body { 
    background: linear-gradient(to bottom, #333, #333 50%, #3a3a3a 50%, #3a3a3a); 
    background-size: 100% 4px; 
    color: #ffedcc; 
    text-shadow: 0 0 10px #ffa500; 
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.5em; 
    padding: 0 0.25em;
}

center {
    margin: 0;
    padding: 0;
    display: block;
}


ul li {
    text-align: left;
    list-style-type: circle;
}


.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 165, 0, 0.075) 0px,
            rgba(255, 192, 203, 0.05) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(
            45deg,
            transparent 49%,
            rgba(255,140,0,0.05) 50%,
            transparent 51%
        );
    animation: scan 5s linear infinite;
}

a, a:visited {
    color: #ffebcc;  /* Lightened amber to match ASCII art */
    text-decoration: none;
}

a:hover {
    color: #fff0f0;
    text-shadow: 0 0 15px #ff9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu ul li a {
    background-color: #666;
    color: #ffd799;
    text-shadow: 0 0 10px #ffcc80;
}

.menu ul li a:hover {
    background-color: #588;
    color: #ffaaff;
    text-shadow: 0 0 15px #ff99ff;
}

.header {
    border: 1px solid #fec;
    border-radius: 5px;
    padding: 5px;
    width: 95%;
    margin: 5px auto;
}

/* Responsive Retro Header */
.retro-header {
    background: transparent;
    margin: 0 auto 5px auto;
    max-width: 800px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-text {
    font-family: 'VT323', monospace;
    font-size: 2.5em;
    color: #ffedcc;
    text-align: center;
    text-shadow: 
        0 0 10px #ffa500,
        0 0 20px #ffa500,
        0 0 30px #ffa500;
    letter-spacing: 2px;
    margin: 0;
}

.header-ascii {
    font-family: 'Times New Roman', Times, serif;
    font-size: 3.0em;
    color: #ffedcc;
    text-align: center;
    text-shadow: 0 0 10px #ffa500;
    letter-spacing: normal;
    white-space: normal;
    line-height: 1.2;
    overflow: visible;
    font-weight: normal;
    margin: 0;
    padding: 0;
}

.content-container {
    background: rgba(139, 69, 19, 0.4) !important;
    border: 4px solid rgba(139, 69, 19, 0.7) !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin: 10px auto !important;
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.5) !important;
    position: relative !important;
    z-index: 1000 !important;
    max-width: 800px;
    display: block;
}

.content-container img {
    max-width: min(100%, 600px);
    height: auto;
    display: block;
    margin: 10px auto;
    padding: 0 5px;
}

/* Responsive Video Styling */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
}

.video-wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    border: 1px solid #ffedcc;
    border-radius: 4px;
}

/* Gallery styles */
.gallery-container {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    box-sizing: border-box !important;
}

.gallery-grid a {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    float: none !important;
    position: relative !important;
}

.gallery-grid a img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    max-width: 100% !important;
    object-fit: cover !important;
    border: 1px solid #cc8800 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    transform: none !important;
}

@media screen and (max-width: 768px) {
    body {
        font-size: 1.2em !important;
        padding: 0 5px !important;
    }
    
    .retro-header {
        margin: 5px auto 3px auto !important;
        max-width: calc(100% - 20px) !important;
    }
    
    .header-text {
        font-size: 1.6em !important;
        letter-spacing: 1px !important;
    }
    
    .header-ascii {
        font-family: 'Times New Roman', Times, serif !important;
        font-size: 2.4em !important;
        line-height: 1.2 !important;
    }
    
    .content-container {
        background: rgba(139, 69, 19, 0.3) !important;
        border: 4px solid #ffedcc !important;
        box-shadow: 0 0 25px rgba(139, 69, 19, 0.35) !important;
        margin: 15px auto !important;
        padding: 20px !important;
        width: calc(100% - 60px) !important;
        max-width: 650px !important;
        min-height: 80px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .content-container img {
        max-width: 95% !important;
        padding: 0 8px !important;
    }
    
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 1.4em !important;
    }

    .retro-header {
        margin: 3px auto 2px auto !important;
        max-width: calc(100% - 10px) !important;
    }
    
    .header-text {
        font-size: 1.2em !important;
        letter-spacing: 0.5px !important;
    }
    
    .header-ascii {
        font-family: 'Times New Roman', Times, serif !important;
        font-size: 1.8em !important;
        line-height: 1.2 !important;
    }
    
    .content-container {
        background: rgba(139, 69, 19, 0.35) !important;
        border: 5px solid #ffedcc !important;
        box-shadow: 0 0 30px rgba(139, 69, 19, 0.4) !important;
        margin: 15px auto !important;
        padding: 15px !important;
        width: calc(100% - 40px) !important;
        max-width: 540px !important;
        min-height: 100px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .content-container img {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .video-wrapper iframe {
        width: 90% !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

@keyframes scan {
    0% { transform: translateY(-100%) rotate(0.05deg); }
    100% { transform: translateY(100vh) rotate(0.05deg); }
}


/* === Feed section (computers.faith) === */
.content-box .feed-section { margin-top: 0.5rem; }

/* item container + delineation */
.content-box .feed-section .feed-item {
  margin: 0.75rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 215, 128, 0.35);
}

/* single row: title left, time right */
.content-box .feed-section .feed-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

/* === Feed section (computers.faith) === */
.content-box .feed-section { margin-top: 0.5rem; }

.content-box .feed-section .feed-item {
  margin: 0.75rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 215, 128, 0.35);
}

.content-box .feed-section .feed-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.content-box .feed-section .feed-title {
  flex: 1 1 auto;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  text-align: left;
  margin: 0;
}

.content-box .feed-section .feed-title a {
  text-decoration: none;
}

.content-box .feed-section .feed-title a::before {
  content: "[";
  margin-right: .25rem;
  opacity: .7;
}
.content-box .feed-section .feed-title a::after {
  content: "]";
  margin-left: .25rem;
  opacity: .7;
}

.content-box .feed-section .feed-time {
  flex: 0 0 auto;
  font-size: 0.8rem;
  opacity: 0.85;
  white-space: nowrap;
  text-align: right;
}
