* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    background:
        linear-gradient(
            rgba(0, 25, 45, 0.45),
            rgba(0, 25, 45, 0.8)
        );
}

.page {
    width: min(1100px, 94%);
    margin: 0 auto;
    padding: 32px 0;
}

header {
    margin-bottom: 24px;
    text-align: center;
}

h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: #e3f5ff;
}


/* Home page camera cards */

.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.camera-card {
    overflow: hidden;
    border-radius: 16px;
    background: rgba(0, 20, 35, 0.82);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: white;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.camera-card:hover,
.camera-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.camera-card:focus-visible {
    outline: 3px solid #e3f5ff;
    outline-offset: 4px;
}

.camera-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.camera-content {
    padding: 20px;
}

.camera-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.camera-card-description {
    margin: 0;
    color: #cde9f6;
    line-height: 1.5;
}

.status {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #c40000;
    font-size: 0.8rem;
    font-weight: bold;
}

.coming-soon {
    cursor: default;
    opacity: 0.7;
}

.coming-soon .status {
    background: #555;
}


/* Live camera page */

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 14px;
    background: black;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.information {
    margin-top: 22px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(0, 20, 35, 0.76);
    backdrop-filter: blur(6px);
    text-align: center;
}

.conditions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
    text-align: left;
}

.condition-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.condition-card h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    line-height: 1.3;
    color: #e3f5ff;
}

.condition-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.camera-description {
    max-width: 850px;
    margin: 0 auto;
    text-align: left;
}

.camera-description h2 {
    margin: 0 0 18px;
    text-align: center;
    color: #e3f5ff;
}

.camera-description h3 {
    margin: 22px 0 10px;
    color: #e3f5ff;
}

.camera-description p {
    margin: 0 0 14px;
    line-height: 1.55;
}

.camera-description ul {
    margin: 0;
    padding-left: 24px;
    line-height: 1.7;
}

.camera-description li {
    margin-bottom: 4px;
}

.counter {
    margin-top: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #ccecff;
}


/* Buttons and contact links */

.youtube-link {
    display: inline-block;
    margin-top: 14px;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: #cc0000;
    text-decoration: none;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.youtube-link:hover,
.youtube-link:focus-visible {
    background: #e00000;
}

.youtube-link:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.contact-links .youtube-link {
    margin-top: 0;
}


/* About page */

.about-panel {
    padding: 24px;
    border-radius: 18px;
    background: rgba(5, 29, 46, 0.92);
}

.about-header {
    margin-bottom: 26px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.about-card {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.08);
}

.about-card h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.about-card p {
    margin: 0 0 14px;
    line-height: 1.6;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.about-card li {
    margin-bottom: 9px;
    line-height: 1.5;
}

.safety-card {
    grid-column: 1 / -1;
}

.share-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.share-text {
    flex: 1;
}

.share-qr-code {
    display: block;
    width: min(220px, 40%);
    height: auto;
    padding: 8px;
    border-radius: 10px;
    background: white;
}


/* Page count viewer */

.count-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.page-count {
    margin: 24px 0 12px;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: bold;
    line-height: 1;
}

.count-note {
    opacity: 0.8;
}

#refresh-count:disabled {
    cursor: wait;
    opacity: 0.65;
}


/* Shared footer */

.site-footer {
    margin-top: 28px;
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.site-footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}

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


/* Responsive layout */

@media (max-width: 750px) {
    .page {
        width: min(94%, 1100px);
        padding: 20px 0;
    }

    .information {
        padding: 16px;
    }

    .conditions {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 24px;
    }

    .condition-card {
        padding: 16px;
    }

    .camera-description h2 {
        font-size: 1.55rem;
    }

    .about-panel {
        padding: 16px;
    }

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

    .safety-card {
        grid-column: auto;
    }

    .share-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-qr-code {
        width: min(220px, 80%);
        margin: 0 auto;
    }
}

@media (max-width: 500px) {
    .camera-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-links .youtube-link {
        width: 100%;
        text-align: center;
    }
}
