/*!
 * HaoChi Trading - shared boardgame styles
 *
 * Common rules used by boardgame/index.html, boardgame/catalog.html and
 * boardgame/printing.html. Each page may still override these in its inline
 * <style> block (for hero padding, font-size etc.).
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-height: 100px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lang-selector {
    display: flex;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem;
    border-radius: 5px;
}

.lang-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.8rem;
    transition: all 0.3s;
    min-width: 30px;
    text-align: center;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-weight: 500;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
}

footer {
    background: #1a1a2e;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

.hc-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #0f1629;
}

.hc-lightbox-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
}

.material-img .hc-lightbox-link {
    position: relative;
}

.material-img .hc-thumb-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.95rem, 2.8vw, 1.35rem);
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-shadow:
        0 2px 16px rgba(0, 0, 0, 0.85),
        0 0 4px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    z-index: 1;
}

.hc-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.hc-lightbox.is-open {
    display: flex;
}

.hc-lightbox__panel {
    width: min(980px, 100%);
    background: rgba(15, 22, 41, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.hc-lightbox__img {
    width: 100%;
    height: auto;
    display: block;
    background: #0b1020;
}

.hc-lightbox__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}

.hc-lightbox__caption {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hc-lightbox__close {
    appearance: none;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.hc-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hc-mini-gallery {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.hc-mini-gallery figure {
    margin: 0;
}

.hc-mini-gallery figcaption {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.65);
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .lang-selector {
        justify-content: center;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }

    nav {
        display: none;
        width: 100%;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    nav a {
        display: block;
        padding: 0.8rem 1rem;
        background: rgba(255, 255, 255, 0.05);
    }
}
