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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    background: #1a1a2e;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e94560;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.lang-btn {
    background: #e94560;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.lang-btn:hover {
    background: #c73652;
}

.nav-links a {
    color: #eee;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e94560;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
}

.hero-track {
    display: flex;
    transition: transform 0.6s ease;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 620px;
    display: flex;
    align-items: center;
    background-position: center 35%;
    background-size: cover;
}

.hero-slide-art {
    background-image: url("../images/epaper_vegetable.jpg");
}

.hero-slide-board {
    background-image: url("../images/ai_s3.jpg");
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 20, 34, 0.92) 0%, rgba(15, 20, 34, 0.68) 46%, rgba(15, 20, 34, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 90px;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    font-weight: 800;
    max-width: 680px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-control {
    position: absolute;
    z-index: 2;
    top: 52%;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(15, 20, 34, 0.65);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.hero-control:hover {
    background: #e94560;
    transform: scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 2;
    bottom: 28px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.hero-dots button.active {
    background: #fff;
}

.btn {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 14px 36px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: #c73652;
    transform: translateY(-2px);
}

.btn-secondary {
    border: 2px solid #e94560;
    background: transparent;
    color: #e94560;
}

.btn-secondary:hover {
    background: #e94560;
    color: #fff;
}

/* Gallery */
.gallery {
    padding: 64px 20px;
    background: #f8f9fa;
}

.gallery h2,
.board h2,
.firmware h2,
.features h2,
.contact h2 {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 50px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.gallery-card:hover,
.gallery-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

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

.gallery-card img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(26, 26, 46, 0.9));
    padding: 40px 24px 24px;
    color: #fff;
}

.card-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.card-overlay p {
    opacity: 0.8;
    font-size: 0.95rem;
}

/* Gallery image popup */
body.lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    margin: auto;
    width: 96vw;
    max-width: 96vw;
    height: 96vh;
    height: 96dvh;
    max-height: 96vh;
    max-height: 96dvh;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: #1a1a2e;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox[open] {
    display: flex;
    flex-direction: column;
}

.gallery-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-toolbar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.lightbox-close {
    padding: 8px 12px;
    min-height: 44px;
    border: none;
    border-radius: 20px;
    background: #e94560;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.lightbox-close {
    margin-left: auto;
}

.lightbox-close:hover {
    background: #c73652;
}

.lightbox-close:focus-visible,
.lightbox-viewport:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.lightbox-zoom-level {
    min-width: 5ch;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.lightbox-viewport {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    background: #10101d;
    border-radius: 8px;
}

.lightbox-image {
    display: block;
    margin: 0 auto;
    max-width: none;
}

#lightbox-hint {
    flex-shrink: 0;
    margin-top: 12px;
    color: #c8c8d8;
    font-size: 0.85rem;
    text-align: center;
}

#lightbox-caption {
    flex-shrink: 0;
    margin-top: 12px;
    text-align: center;
}

/* Board */
.board {
    padding: 64px 20px;
    background: #fff;
}

.board-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.board-gallery img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.board-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 30px;
}

.board-highlights {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.board-highlights li {
    position: relative;
    padding: 10px 0 10px 32px;
    color: #333;
    font-size: 1.05rem;
    border-bottom: 1px solid #eee;
}

.board-highlights li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 10px;
    color: #e94560;
    font-weight: 700;
}

.board-specs-title {
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.board-specs {
    color: #666;
    font-size: 0.95rem;
}

.board-plans {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plan-card {
    padding: 24px 28px;
    border-radius: 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.plan-featured {
    border-color: #e94560;
}

.plan-card h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #e94560;
    margin-bottom: 10px;
}

.plan-card p {
    color: #666;
    font-size: 0.95rem;
}

.board-cta {
    text-align: center;
    margin-top: 50px;
}

/* Firmware */
.firmware {
    padding: 64px 20px;
    background: #f8f9fa;
}

.firmware-details {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 28px;
    border: 2px solid #e94560;
    border-radius: 16px;
    background: #f8f9fa;
}

.firmware-details h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.firmware-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
}

.firmware-highlights li {
    position: relative;
    padding: 10px 0 10px 32px;
    color: #333;
    font-size: 1.05rem;
    border-bottom: 1px solid #ddd;
}

.firmware-highlights li:last-child {
    border-bottom: 0;
}

.firmware-highlights li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 10px;
    color: #e94560;
    font-weight: 700;
}

.firmware-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    text-align: center;
    margin-top: 50px;
}

/* Photo frame guide */
.photoframe-page {
    background: #f4f5f2;
    color: #282a2d;
}

.photoframe-navbar {
    position: absolute;
    background: rgba(17, 18, 21, 0.88);
    box-shadow: none;
}

.photoframe-nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.photoframe-nav-actions a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.photoframe-nav-actions a:hover,
.photoframe-nav-actions a:focus-visible {
    color: #f56a7e;
}

.photoframe-hero {
    min-height: 510px;
    display: flex;
    align-items: flex-end;
    position: relative;
    isolation: isolate;
    padding: 150px 20px 70px;
    overflow: hidden;
    background: #18191c url("../images/ai_s3.jpg") center 42% / cover no-repeat;
    color: #fff;
}

.photoframe-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 16, 18, 0.96) 0%, rgba(15, 16, 18, 0.8) 48%, rgba(15, 16, 18, 0.28) 100%);
}

.photoframe-hero-content {
    width: 100%;
}

.photoframe-kicker,
.photoframe-step,
.photoframe-mode-label {
    color: #f56a7e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.photoframe-hero h1 {
    max-width: 760px;
    margin: 8px 0 14px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 5.2rem;
    line-height: 0.98;
    letter-spacing: 0;
}

.photoframe-hero-content > p:not(.photoframe-kicker) {
    max-width: 690px;
    color: #e5e5e8;
    font-size: 1.15rem;
}

.photoframe-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 34px;
}

.photoframe-quick-links a {
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.photoframe-main {
    display: grid;
    grid-template-columns: 210px minmax(0, 780px);
    justify-content: center;
    gap: 70px;
    padding-top: 70px;
    padding-bottom: 100px;
}

.photoframe-toc {
    position: sticky;
    top: 30px;
    align-self: start;
    padding-left: 18px;
    border-left: 2px solid #d9d9d3;
}

.photoframe-toc p {
    margin-bottom: 12px;
    color: #1a1a2e;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.photoframe-toc a {
    display: block;
    padding: 5px 0;
    color: #666963;
    font-size: 0.86rem;
    line-height: 1.35;
    text-decoration: none;
}

.photoframe-toc a:hover,
.photoframe-toc a:focus-visible,
.photoframe-content a {
    color: #c73652;
}

.photoframe-section {
    scroll-margin-top: 30px;
    padding: 0 0 72px;
    margin-bottom: 10px;
    border-bottom: 1px solid #d9d9d3;
}

.photoframe-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.photoframe-section h2 {
    margin: 6px 0 22px;
    color: #1a1a2e;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.35rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.photoframe-section h3 {
    margin: 32px 0 10px;
    color: #1a1a2e;
    font-size: 1.15rem;
}

.photoframe-section p + p {
    margin-top: 14px;
}

.photoframe-section code {
    padding: 0.14em 0.38em;
    border-radius: 4px;
    background: #e7e8e3;
    color: #9e2941;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.88em;
}

.photoframe-section pre {
    max-width: 100%;
    margin: 18px 0;
    padding: 18px 20px;
    overflow-x: auto;
    border-left: 4px solid #e94560;
    background: #1b1c20;
    color: #f4f4f4;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.photoframe-section pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 0.84rem;
}

.photoframe-steps {
    margin: 22px 0 28px;
    padding: 0;
    list-style: none;
    counter-reset: photoframe-list;
}

.photoframe-steps li {
    position: relative;
    min-height: 38px;
    padding: 5px 0 15px 46px;
    counter-increment: photoframe-list;
}

.photoframe-steps li::before {
    content: counter(photoframe-list);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border: 1px solid #b9bab5;
    border-radius: 50%;
    color: #1a1a2e;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 28px;
    text-align: center;
}

.photoframe-photo {
    display: block;
    width: 100%;
    margin-top: 28px;
    object-fit: contain;
}

.photoframe-photo-small {
    max-width: 460px;
}

.photoframe-callout {
    margin: 24px 0;
    padding: 20px 22px;
    border-left: 4px solid #497a9f;
    background: #e8f0f5;
}

.photoframe-callout strong {
    display: block;
    margin-bottom: 5px;
    color: #1a1a2e;
}

.photoframe-callout p {
    margin: 0;
}

.photoframe-callout-warning {
    border-color: #b87c19;
    background: #fff5df;
}

.photoframe-callout-danger {
    border-color: #d73a55;
    background: #fbeaed;
}

.photoframe-button-note {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    margin-top: 28px;
    background: #d9d9d3;
    border: 1px solid #d9d9d3;
}

.photoframe-button-note div {
    padding: 20px;
    background: #fff;
}

.photoframe-button-note strong,
.photoframe-button-note span {
    display: block;
}

.photoframe-button-note span {
    margin-top: 6px;
    color: #656761;
    font-size: 0.9rem;
}

.photoframe-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 26px 0;
}

.photoframe-mode {
    padding: 24px;
    border-top: 4px solid #1a1a2e;
    background: #fff;
}

.photoframe-mode h3 {
    margin: 4px 0 12px;
}

.photoframe-video {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 24px;
    background: #1b1c20;
    border-radius: 8px;
}

.photoframe-figure-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr);
    align-items: start;
    gap: 22px;
    margin: 30px 0;
}

.photoframe-figure-grid figure {
    padding: 12px;
    background: #fff;
}

.photoframe-figure-grid img {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: contain;
}

.photoframe-figure-grid figcaption {
    padding: 10px 4px 2px;
    color: #666963;
    font-size: 0.82rem;
}

.photoframe-download-table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.photoframe-download-table th,
.photoframe-download-table td {
    padding: 14px 16px;
    border: 1px solid #d9d9d3;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.photoframe-download-table thead {
    background: #e7e8e3;
    color: #1a1a2e;
}

.photoframe-download-table th:last-child {
    width: 32%;
}

.photoframe-download-table tbody th {
    font-weight: 500;
}

.photoframe-download-table a {
    display: inline-block;
    padding: 8px 0;
    font-weight: 600;
}

.photoframe-download-table a:focus-visible {
    outline: 2px solid #c73652;
    outline-offset: 3px;
}

/* Features */
.features {
    padding: 64px 20px;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: 16px;
    background: #f8f9fa;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Contact */
.contact {
    padding: 64px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    text-align: center;
}

.contact p {
    margin: 16px auto 40px;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #111;
    color: #888;
    text-align: center;
    padding: 24px 20px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 560px;
    }

    .hero-slide::before {
        background: rgba(15, 20, 34, 0.7);
    }

    .hero-content {
        padding: 100px 50px 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-control {
        width: 38px;
        height: 38px;
    }

    .hero-prev {
        left: 8px;
    }

    .hero-next {
        right: 8px;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.9rem;
    }

    .photoframe-navbar .logo span {
        font-size: 1.05rem;
    }

    .photoframe-nav-actions {
        gap: 14px;
        font-size: 0.85rem;
    }

    .photoframe-hero {
        min-height: 540px;
        padding: 130px 4px 54px;
        background-position: 60% center;
    }

    .photoframe-hero::before {
        background: rgba(15, 16, 18, 0.76);
    }

    .photoframe-hero h1 {
        font-size: 2.7rem;
    }

    .photoframe-main {
        display: block;
        padding-top: 42px;
        padding-bottom: 70px;
    }

    .photoframe-toc {
        position: static;
        margin-bottom: 54px;
        columns: 2;
    }

    .photoframe-toc p {
        column-span: all;
    }

    .photoframe-section {
        padding-bottom: 52px;
        margin-bottom: 52px;
    }

    .photoframe-section h2 {
        font-size: 1.9rem;
    }

    .photoframe-button-note,
    .photoframe-mode-grid,
    .photoframe-figure-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .gallery-card img {
        height: 350px;
    }
}
