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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.logo-placeholder {
    width: 150px;
    height: 150px;
    margin: 0 auto 10px auto;
    background: rgba(255, 255, 255, 0.2);
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.logo-placeholder:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.3em;
    opacity: 0.95;
}

.content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

section {
    margin: 40px 0;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

h3 {
    color: #764ba2;
    margin: 25px 0 15px 0;
    font-size: 1.5em;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
}

.feature-list {
    background: #f8f9fa;
    padding: 20px 30px;
    border-left: 4px solid #667eea;
    margin: 20px 0;
}

.feature-list li {
    margin: 10px 0;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    margin: 10px 10px 10px 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.info-box {
    background: #e3f2fd;
    border-left: 5px solid #2196f3;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.warning-box {
    background: #fff3e0;
    border-left: 5px solid #ff9800;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 0.9em;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .content {
        padding: 20px;
    }

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

img {
    /* Set the full width of its parent container */
    max-width: 100%;
    object-fit: scale-down;
    /* Maintains aspect ratio */
    height: auto;
}


/* ---------------------------------------------------------------------------
   Site navigation — a slim row in the header, repeated by hand on each page
   --------------------------------------------------------------------------- */

.site-nav {
    margin-top: 16px;
    font-size: 0.95em;
}

.site-nav a,
.site-nav strong {
    color: white;
    text-decoration: none;
}

.site-nav a {
    opacity: 0.8;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: opacity 0.3s, border-color 0.3s;
}

.site-nav a:hover {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

.site-nav a:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}

/* The current page is not a link — it just marks where you are. */
.site-nav strong {
    opacity: 1;
}

.site-nav .sep {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.45);
}


/* ---------------------------------------------------------------------------
   Channel QR grid (channels.html)
   --------------------------------------------------------------------------- */

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 25px;
    margin: 25px 0;
    padding: 0;
    list-style: none;
}

.qr-grid li {
    text-align: center;
}

/* The trigger is a button so keyboard and screen-reader support is native,
   but it must not look like one. */
.qr-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: 8px;
    transition: transform 0.3s;
}

.qr-trigger img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.qr-trigger:hover {
    transform: translateY(-3px);
}

.qr-trigger:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.qr-name {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #764ba2;
}

.qr-key {
    display: block;
    margin-top: 4px;
    font-size: 0.78em;
    word-break: break-all;
    color: #555;
}


/* ---------------------------------------------------------------------------
   QR darkbox — isolates a single code so a camera cannot catch its neighbours
   --------------------------------------------------------------------------- */

.qr-darkbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
    /* Fully opaque on purpose. At any transparency the neighbouring codes stay
       faintly visible through the scrim — and a QR code only has to be faintly
       visible to be decoded, which is the problem this exists to solve. */
    background: #0b0b0b;
}

.qr-darkbox[hidden] {
    display: none;
}

.qr-darkbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-darkbox img {
    display: block;
    width: min(78vw, 78vh);
    height: auto;
    padding: 14px;
    border-radius: 10px;
    background: white;
}

.qr-darkbox figcaption {
    text-align: center;
    color: white;
}

.qr-darkbox-name {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
}

.qr-darkbox-key {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    word-break: break-all;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.qr-darkbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s;
}

.qr-darkbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.qr-darkbox-close:focus-visible {
    outline: 3px solid white;
    outline-offset: 2px;
}

/* Locks the page behind the darkbox so it cannot be scrolled while open. */
body.qr-darkbox-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .qr-trigger,
    .card,
    .cta-button {
        transition: none;
    }

    .qr-trigger:hover,
    .card:hover,
    .cta-button:hover {
        transform: none;
    }
}
