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

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    background-image: url('https://x.allcdn.net/spacism-web/images/bg5-restored.jpeg');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: #e0e6ed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Shooting stars container */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Individual shooting star */
.shooting-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.05),0 0 0 4px rgba(255,255,255,0.03),0 0 10px rgba(255,255,255,0.05);
    animation: shoot 5s linear infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
}

@keyframes shoot {
    0% {
        transform: rotate(315deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: rotate(315deg) translateX(-1000px);
        opacity: 0;
    }
}

/* Individual star positioning and timing */
.shooting-star:nth-child(1) {
    top: 10%;
    right: 0;
    left: initial;
    animation-delay: 0s;
    animation-duration: 12s;
}

.shooting-star:nth-child(2) {
    top: 20%;
    right: 40%;
    left: initial;
    animation-delay: 4s;
    animation-duration: 15s;
}

.shooting-star:nth-child(3) {
    top: 30%;
    right: 70%;
    left: initial;
    animation-delay: 8s;
    animation-duration: 13s;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 1.5rem 2rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.75) 0%, rgba(5, 8, 20, 0.85) 100%);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%, 0 calc(100% - 30px));
    border: 2px solid rgba(79, 172, 254, 0.4);
    border-left: 6px solid #4facfe;
    border-right: 6px solid #4facfe;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    border-bottom: none;
    position: relative;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(79, 172, 254, 0.05),
        0 0 30px rgba(79, 172, 254, 0.1);
    backdrop-filter: blur(10px);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #4facfe 0%, transparent 50%);
    opacity: 0.5;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #4facfe 50%, transparent 100%);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
    animation: glow-line 3s ease-in-out infinite;
}

@keyframes glow-line {
    0%, 100% {
        box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 25px rgba(79, 172, 254, 0.8);
        opacity: 0.8;
    }
}

@keyframes text-glow {
    0%, 100% {
        filter:
            drop-shadow(0 10px 2px rgba(0, 20, 60, 1))
            drop-shadow(0 0 25px rgba(79, 172, 254, 0.8))
            drop-shadow(0 0 50px rgba(79, 172, 254, 0.6));
    }
    50% {
        filter:
            drop-shadow(0 10px 2px rgba(0, 20, 60, 1))
            drop-shadow(0 0 30px rgba(79, 172, 254, 0.9))
            drop-shadow(0 0 60px rgba(79, 172, 254, 0.7));
    }
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(4.5rem, 10vw, 7.5rem);
    font-weight: 900;
    background: linear-gradient(90deg, #ff8c00 0%, #ffa500 15%, #ffb347 30%, #ffd700 50%, #ffb347 70%, #ffa500 85%, #ff8c00 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: clamp(0.08em, 1.2vw, 0.2em);
    filter:
        drop-shadow(0 10px 2px rgba(0, 20, 60, 1))
        drop-shadow(0 0 25px rgba(79, 172, 254, 0.8))
        drop-shadow(0 0 50px rgba(79, 172, 254, 0.6));
    animation: text-glow 4s ease-in-out infinite;
    position: relative;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    color: #00f2fe;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-shadow:
        0 0 8px rgba(0, 242, 254, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(79, 172, 254, 0.3);
    border-bottom: 1px solid rgba(79, 172, 254, 0.3);
    padding: 0.5rem 0;
    margin-top: 0;
    display: inline-block;
    min-width: 400px;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    height: 45px;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, rgba(40, 55, 80, 0.9) 0%, rgba(30, 45, 70, 0.95) 100%);
    border: 3px solid rgba(60, 80, 110, 0.6);
    border-left: 6px solid #5a6a8a;
    border-right: 6px solid #5a6a8a;
    border-top: none;
    position: relative;
    overflow: visible;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(255, 255, 255, 0.08),
        0 0 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    pointer-events: none;
}

nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    pointer-events: none;
}

.nav-separator {
    width: 20px;
    height: 55px;
    background: linear-gradient(180deg,
        rgba(50, 65, 90, 0.95) 0%,
        rgba(40, 55, 80, 1) 50%,
        rgba(50, 65, 90, 0.95) 100%);
    box-shadow:
        -2px 0 4px rgba(0, 0, 0, 0.5),
        2px 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 0 rgba(180, 200, 220, 0.6);
    position: relative;
    border-top: 1px solid rgba(180, 200, 220, 0.4);
}

/* Metallic left edge on separator */
.nav-separator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.7) 0%,
        rgba(0,0,0,0.7) 10%,
        rgba(90,106,138,0.3) 20%,
        rgba(0,0,0,0.85) 30%,
        rgba(0,0,0,0.9) 50%,
        rgba(160,180,200,0.4) 55%,
        rgba(0,0,0,0.55) 65%,
        rgba(120,140,170,0.3) 75%,
        rgba(0,0,0,0.75) 90%,
        rgba(0,0,0,0.65) 100%);
    box-shadow:
        1px 0 2px rgba(0,0,0,0.6) inset,
        -1px 0 2px rgba(255,255,255,0.3) inset,
        0 0 10px rgba(0,0,0,0.5);
}

/* Metallic right edge on separator */
.nav-separator::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.65) 0%,
        rgba(0,0,0,0.75) 10%,
        rgba(120,140,170,0.3) 25%,
        rgba(0,0,0,0.55) 35%,
        rgba(160,180,200,0.4) 45%,
        rgba(0,0,0,0.9) 50%,
        rgba(0,0,0,0.85) 70%,
        rgba(90,106,138,0.3) 80%,
        rgba(0,0,0,0.7) 90%,
        rgba(0,0,0,0.7) 100%);
    box-shadow:
        -1px 0 2px rgba(0,0,0,0.6) inset,
        1px 0 2px rgba(255,255,255,0.3) inset,
        0 0 10px rgba(0,0,0,0.5);
}

nav a {
    color: #d0d8e0;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.3s ease;
    padding: 0.85rem 0;
    width: 200px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg,
        rgba(50, 65, 90, 0.3) 0%,
        rgba(35, 50, 75, 0.2) 100%);
    overflow: hidden;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    box-shadow:
        inset 0 2px 0 0 rgba(160, 170, 180, 0.4),
        inset 0 -2px 0 0 rgba(160, 170, 180, 0.4),
        inset 0 2px 8px rgba(160, 170, 180, 0.2),
        inset 0 -2px 8px rgba(160, 170, 180, 0.2);
}

.nav-text {
    position: relative;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 180, 255, 0.8);
}

nav a.active .nav-text {
    text-shadow:
        0 0 15px rgba(255, 165, 0, 0.6),
        0 0 8px rgba(255, 140, 0, 0.5),
        0 2px 8px rgba(255, 120, 0, 0.4);
}

/* Digital screen scan lines effect */
nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 180, 255, 0.15),
        rgba(0, 180, 255, 0.15) 2px,
        rgba(0, 220, 255, 0.25) 2px,
        rgba(0, 220, 255, 0.25) 4px
    );
    box-shadow: inset 0 0 30px rgba(0, 220, 255, 0.5);
    pointer-events: none;
    z-index: 0;
}

/* Golden orange screen glow for active nav item */
nav a.active::before {
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 200, 0, 0.7),
        rgba(255, 200, 0, 0.7) 2px,
        rgba(255, 215, 50, 0.75) 2px,
        rgba(255, 215, 50, 0.75) 4px
    );
    box-shadow:
        inset 0 0 50px rgba(255, 179, 14, 0.6),
        inset 0 0 25px rgba(255, 230, 180, 0.7);
}

/* Colored indicator lines */
nav a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: none;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

nav a:hover {
    background: linear-gradient(180deg,
        rgba(60, 80, 110, 0.5) 0%,
        rgba(45, 65, 95, 0.4) 100%);
    color: #ffffff;
}

nav a.active {
    background: linear-gradient(180deg,
        rgba(55, 75, 105, 0.6) 0%,
        rgba(40, 60, 90, 0.5) 100%);
    color: #fff;
    box-shadow:
        inset 0 2px 0 0 rgba(255, 200, 100, 0.6),
        inset 0 -2px 0 0 rgba(255, 200, 100, 0.6),
        inset 0 2px 8px rgba(255, 180, 80, 0.4),
        inset 0 -2px 8px rgba(255, 180, 80, 0.4);
}

nav a.active::after {
    box-shadow:
        inset 0 3px 0 0 rgba(255, 254, 253, 0.6),
        inset 0 3px 8px rgba(255, 140, 0, 0.6),
        inset 0 -3px 0 0 rgba(255, 140, 0, 0.8),
        inset 0 -3px 8px rgba(255, 140, 0, 0.6);
}

nav a:not(.active):hover::after {
    box-shadow:
        inset 0 3px 0 0 rgba(0, 242, 254, 0.6),
        inset 0 3px 6px rgba(0, 242, 254, 0.5),
        inset 0 -3px 0 0 rgba(0, 242, 254, 0.6),
        inset 0 -3px 6px rgba(0, 242, 254, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.news-item {
    /* A long unbreakable string (a URL in a feed description) must wrap, not
       push the card past a phone's width: the grid track would otherwise
       grow to the string's width (min-width: auto). */
    min-width: 0;
    overflow-wrap: anywhere;
    background: rgba(10, 14, 39, 0.85);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    padding: 1.5rem;
    border-left: 3px solid rgba(79, 172, 254, 0.4);
    border-top: 1px solid rgba(79, 172, 254, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    grid-column: span 4;
    display: flex;
    flex-direction: column;
}

.news-item:first-of-type {
    grid-column: span 12;
    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 25px 100%, 0 calc(100% - 25px));
    border-left: 4px solid #ff8c00;
    padding: 2.5rem;
}

.news-item:first-of-type .news-title {
    font-size: 2rem;
}

.news-item:first-of-type .news-description {
    font-size: 1.1rem;
}

.news-item:nth-of-type(2),
.news-item:nth-of-type(3) {
    grid-column: span 6;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #ff8c00 0%, transparent 50%);
    opacity: 0.3;
}

.news-item:hover {
    transform: translateX(4px) translateY(-2px);
    border-left-color: #ff8c00;
    box-shadow: -4px 8px 24px rgba(255, 140, 0, 0.2);
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(79, 172, 254, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    color: #4facfe;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    line-height: 1.4;
}

.news-description {
    color: #b0b8c4;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #8b95a5;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.news-source {
    font-weight: 600;
    color: #4facfe;
}

.news-date {
    font-size: 1rem;
    font-weight: 600;
    color: #4facfe;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 5px rgba(79, 172, 254, 0.3);
}

.news-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
    border: 2px solid #ffa500;
    border-radius: 4px;
    color: #ffa500;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.2);
}

.news-link:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3) 0%, rgba(255, 215, 0, 0.3) 100%);
    color: #fff;
    border-color: #ffb347;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    transform: translateY(-2px);
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    height: 55px;
    margin-top: 2rem;
    background: linear-gradient(180deg, rgba(40, 55, 80, 0.9) 0%, rgba(30, 45, 70, 0.95) 100%);
    border: 3px solid rgba(60, 80, 110, 0.6);
    border-left: 6px solid #5a6a8a;
    border-right: 6px solid #5a6a8a;
    position: relative;
    overflow: visible;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(255, 255, 255, 0.08),
        0 0 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    pointer-events: none;
}

footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    pointer-events: none;
}

footer p {
    color: #d0d8e0;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 3rem;
    margin: 0;
    position: relative;
    background: linear-gradient(180deg,
        rgba(50, 65, 90, 0.3) 0%,
        rgba(35, 50, 75, 0.2) 100%);
    overflow: hidden;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    box-shadow:
        inset 0 2px 0 0 rgba(160, 170, 180, 0.4),
        inset 0 -2px 0 0 rgba(160, 170, 180, 0.4),
        inset 0 2px 8px rgba(160, 170, 180, 0.2),
        inset 0 -2px 8px rgba(160, 170, 180, 0.2);
    text-align: center;
}

.footer-text {
    position: relative;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 180, 255, 0.8);
}

/* Branding row: copyright left, notdsk credit right, inside the screen. */
footer p {
    flex: 0 1 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 0.25rem 1.5rem;
}

.footer-copyright strong {
    color: #fff;
}

.footer-credit {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d0d8e0;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    white-space: nowrap;
}

.footer-credit img {
    display: block;
    width: 40px;
    height: 40px;
    user-select: none;
}

.footer-credit strong {
    color: #ffff00;
    font-weight: 600;
}

.footer-credit:hover strong {
    text-decoration: underline;
}

@media (max-width: 640px) {
    footer {
        height: auto;
    }

    footer p {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 1rem;
        text-align: center;
    }
}

/* Digital screen scan lines effect on footer */
footer p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 180, 255, 0.15),
        rgba(0, 180, 255, 0.15) 2px,
        rgba(0, 220, 255, 0.25) 2px,
        rgba(0, 220, 255, 0.25) 4px
    );
    box-shadow: inset 0 0 30px rgba(0, 220, 255, 0.5);
    pointer-events: none;
    z-index: 0;
}

.footer-separator {
    width: 20px;
    height: 65px;
    background: linear-gradient(180deg,
        rgba(50, 65, 90, 0.95) 0%,
        rgba(40, 55, 80, 1) 50%,
        rgba(50, 65, 90, 0.95) 100%);
    box-shadow:
        -2px 0 4px rgba(0, 0, 0, 0.5),
        2px 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 0 rgba(180, 200, 220, 0.6);
    position: relative;
    border-top: 1px solid rgba(180, 200, 220, 0.4);
}

/* Metallic left edge on footer separator */
.footer-separator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.7) 0%,
        rgba(0,0,0,0.7) 10%,
        rgba(90,106,138,0.3) 20%,
        rgba(0,0,0,0.85) 30%,
        rgba(0,0,0,0.9) 50%,
        rgba(160,180,200,0.4) 55%,
        rgba(0,0,0,0.55) 65%,
        rgba(120,140,170,0.3) 75%,
        rgba(0,0,0,0.75) 90%,
        rgba(0,0,0,0.65) 100%);
    box-shadow:
        1px 0 2px rgba(0,0,0,0.6) inset,
        -1px 0 2px rgba(255,255,255,0.3) inset,
        0 0 10px rgba(0,0,0,0.5);
}

/* Metallic right edge on footer separator */
.footer-separator::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.65) 0%,
        rgba(0,0,0,0.75) 10%,
        rgba(120,140,170,0.3) 25%,
        rgba(0,0,0,0.55) 35%,
        rgba(160,180,200,0.4) 45%,
        rgba(0,0,0,0.9) 50%,
        rgba(0,0,0,0.85) 70%,
        rgba(90,106,138,0.3) 80%,
        rgba(0,0,0,0.7) 90%,
        rgba(0,0,0,0.7) 100%);
    box-shadow:
        -1px 0 2px rgba(0,0,0,0.6) inset,
        1px 0 2px rgba(255,255,255,0.3) inset,
        0 0 10px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    body {
        background-position: left center;
    }

    h1 {
        font-size: clamp(2.5rem, 8vw, 4.5rem);
        letter-spacing: clamp(0.05em, 1vw, 0.15em);
    }

    header {
        padding: 1.5rem 1rem;
    }

    .tagline {
        font-size: 0.9rem;
        min-width: auto;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-item,
    .news-item:first-of-type,
    .news-item:nth-of-type(2),
    .news-item:nth-of-type(3) {
        grid-column: span 1;
    }

    .news-item:first-of-type .news-title {
        font-size: 1.25rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 1rem;
    }

    .stats {
        flex-direction: row;
        gap: 1.5rem;
    }

    .feeds-grid {
        grid-template-columns: 1fr;
    }
}

/* Status page specific styles */
.feeds-grid {
    display: grid;
    /* min(…, 100%): a fixed 320px minimum is wider than a 320px phone's
       content box, so every card overflowed it by the page padding. */
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feed-card {
    background: rgba(10, 14, 39, 0.85);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    padding: 1.5rem;
    border-left: 3px solid rgba(79, 172, 254, 0.4);
    border-top: 1px solid rgba(79, 172, 254, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.feed-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #ff8c00 0%, transparent 50%);
    opacity: 0.3;
}

.feed-card:hover {
    transform: translateX(4px) translateY(-2px);
    border-left-color: #ff8c00;
    box-shadow: -4px 8px 24px rgba(255, 140, 0, 0.2);
}

.feed-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.feed-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(79, 172, 254, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.feed-info {
    font-size: 1.1rem;
    color: #8b95a5;
    line-height: 1.8;
}

.feed-info-item {
    margin-bottom: 0.75rem;
}

.feed-info-label {
    color: #4facfe;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.feed-info-value {
    color: #fff;
    font-size: 1.1rem;
}

.feed-info-value.feed-error {
    color: #ff8a80;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.feed-status.disabled {
    background: rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
    background: rgba(10, 14, 39, 0.85);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    border-left: 3px solid rgba(255, 140, 0, 0.4);
    border-top: 1px solid rgba(255, 140, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    flex: 1;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff8c00 0%, transparent 50%);
    opacity: 0.3;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff8c00;
}

.stat-label {
    font-size: 0.9rem;
    color: #4facfe;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stats-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.server-status-chip {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(10, 14, 39, 0.85);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    border-left: 3px solid rgba(79, 172, 254, 0.4);
    border-top: 1px solid rgba(79, 172, 254, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    align-self: stretch;
}

.server-status-chip::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #4facfe 0%, transparent 50%);
    opacity: 0.3;
}

.server-status-label {
    font-size: 0.9rem;
    color: #4facfe;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.server-status-value {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.server-status-value.online {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.server-status-value.offline {
    color: #ff4d4d;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.8);
}

/* ---- Privacy / Terms: a panel in the feed-card style, the full width of
   the container like the news and feed grids ---- */
.legal {
    margin: 1rem 0 2rem;
    padding: 2rem 2.25rem;
    background: rgba(10, 14, 39, 0.88);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    border-left: 3px solid rgba(79, 172, 254, 0.4);
    border-top: 1px solid rgba(79, 172, 254, 0.2);
    color: #e0e6ed;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.legal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.9rem;
    color: #fff;
    margin: 0 0 0.5rem;
}

.legal-lede {
    color: #8b95a5;
    margin: 0 0 1.5rem;
}

.legal h3 {
    color: #4facfe;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.75rem 0 0.5rem;
}

.legal p,
.legal ul {
    margin: 0 0 0.9rem;
}

.legal ul {
    padding-left: 1.25rem;
}

.legal li {
    margin-bottom: 0.35rem;
}

.legal a {
    color: #4facfe;
}

.legal a:hover {
    color: #fff;
}

.legal strong {
    color: #fff;
}

/* Four tabs: let them share a phone's width instead of clipping. */
@media (max-width: 640px) {
    nav a {
        width: auto;
        flex: 1 1 0;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .legal {
        padding: 1.5rem 1.25rem;
    }
}

/* Status page stats on a phone: the chip above the stats, and the stats
   sized for a 4-digit item count (the live archive overflowed 390px by 18px
   when this row stayed side by side with 3rem gaps). */
@media (max-width: 640px) {
    .stats-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .stats {
        flex-wrap: wrap;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 1.9rem;
    }
}