/* ============================================
   Comedian Website - Main Styles
   Minimalist, black and white, high contrast
   China-optimized: no external dependencies
   ============================================ */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables */
:root {
    --bg: #ffffff;
    --text: #000000;
    --text-muted: #666666;
    --text-light: #888888;
    --border: #d0d0d0;
    --bg-muted: #f5f5f5;
    --radius: 4px;
    --max-width: 900px;
    --section-spacing: 64px;
    --transition: all 0.3s ease;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    body {
        font-size: 17px;
        line-height: 1.7;
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--text);
    text-decoration: none;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 48px;
    }
}

/* ============================================
   Navigation
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 56px;
    display: flex;
    align-items: center;
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text);
}

.nav-logo a {
    color: inherit;
}

.lang-toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lang-toggle button {
    background: var(--bg);
    border: none;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    font-family: inherit;
}

.lang-toggle button:hover {
    color: var(--text);
}

.lang-toggle button.active {
    background: var(--text);
    color: var(--bg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

@media (min-width: 751px) {
    .hero {
        height: 70vh;
        min-height: 400px;
        max-height: 700px;
    }
}

.hero picture,
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero picture {
    display: block;
}

.hero picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 32px 24px 48px;
    color: #ffffff;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(32px, 9vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-content .tagline {
    font-size: clamp(15px, 4vw, 22px);
    font-weight: 400;
    line-height: 1.45;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

@media (min-width: 768px) {
    .hero-content {
        padding: 48px 48px 64px;
    }
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 48px 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--section-spacing) 0;
    }
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 14px;
        margin-bottom: 24px;
        padding-bottom: 12px;
    }
}

/* ============================================
   About Section
   ============================================ */
.about-text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
}

.about-text p {
    margin-bottom: 14px;
}

@media (min-width: 768px) {
    .about-text {
        font-size: 17px;
        line-height: 1.75;
    }

    .about-text p {
        margin-bottom: 16px;
    }
}

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

/* ============================================
   Tour Dates Section
   ============================================ */
.tour-dates {
    min-height: 200px;
}

.tour-loading {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
}

.tour-empty {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
}

.tour-table {
    width: 100%;
    border-collapse: collapse;
}

.tour-table th {
    display: none; /* Mobile: hide headers, use data-label */
}

.tour-table td {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.tour-table tr {
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.tour-table tr:last-child {
    border-bottom: none;
}

.tour-table tr.past-date {
    background: var(--bg-muted);
    padding: 20px 0;
    opacity: 0.6;
}

.tour-date {
    font-weight: 600;
    font-size: 15px;
}

.tour-day {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.tour-city {
    font-weight: 500;
    font-size: 15px;
    margin-top: 4px;
}

.tour-show {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.tour-links {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-ticket {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid var(--text);
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
}

.btn-ticket:hover {
    background: #333;
    border-color: #333;
}

.btn-ticket.btn-outline {
    background: transparent;
    color: var(--text);
}

.btn-ticket.btn-outline:hover {
    background: var(--bg-muted);
}

.tour-soon {
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 8px;
}

/* Desktop table layout */
@media (min-width: 768px) {
    .tour-table {
        display: table;
    }

    .tour-table thead {
        display: table-header-group;
    }

    .tour-table tbody {
        display: table-row-group;
    }

    .tour-table tr {
        display: table-row;
        padding: 0;
        border-bottom: none;
    }

    .tour-table th,
    .tour-table td {
        display: table-cell;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    .tour-table th {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-muted);
        text-align: left;
    }

    .tour-table tr.past-date {
        margin: 0;
        padding: 0;
        opacity: 0.6;
    }

    .tour-links {
        margin-top: 0;
        flex-wrap: nowrap;
    }

    .btn-ticket {
        display: inline-flex;
        flex: 0 0 auto;
        min-width: 120px;
        padding: 10px 18px;
        font-size: 13px;
        border-width: 1px;
        white-space: nowrap;
    }

    .tour-date {
        font-size: 15px;
    }

    .tour-day {
        font-size: 13px;
    }

    .tour-city {
        font-size: 15px;
    }

    .tour-show {
        font-size: 14px;
    }

    .tour-soon {
        font-size: 13px;
    }
}

/* ============================================
   Downloads Section
   ============================================ */
.downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .downloads-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-download:hover {
    border-color: var(--text);
    background: var(--bg-muted);
}

.btn-download.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-download-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-download-icon {
    font-size: 20px;
}

.btn-download-text {
    font-size: 14px;
    font-weight: 500;
}

.btn-download-arrow {
    font-size: 18px;
    color: var(--text-muted);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    text-align: center;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--text);
    color: var(--bg);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 14px;
}

.btn-contact:hover {
    background: #333;
}

.contact-email {
    font-size: 14px;
    color: var(--text-muted);
    word-break: break-all;
}

@media (min-width: 768px) {
    .btn-contact {
        padding: 16px 36px;
        font-size: 17px;
        margin-bottom: 16px;
    }

    .contact-email {
        font-size: 16px;
    }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-social a svg {
    width: 22px;
    height: 22px;
}

.footer-social a:hover {
    border-color: var(--text);
    color: var(--text);
    transform: translateY(-2px);
}

.site-footer p {
    font-size: 13px;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .site-footer p {
        font-size: 15px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .lang-toggle button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .btn-ticket {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ============================================
   Corporate Page
   ============================================ */
.corporate-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .corporate-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.corporate-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.corporate-item:hover {
    border-color: var(--text);
}

.corporate-item-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--bg-muted);
}

.corporate-item-content {
    padding: 20px;
}

.corporate-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.corporate-item p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

@media (min-width: 768px) {
    .corporate-item h3 {
        font-size: 16px;
    }

    .corporate-item p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Corporate actions */
.corporate-actions {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.corporate-downloads {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .corporate-downloads {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.qr-section {
    margin-top: 32px;
}

.qr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 400px;
}

.qr-item {
    text-align: center;
}

.qr-item img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 auto 12px;
    background: var(--bg);
    padding: 8px;
}

.qr-placeholder {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    background: var(--bg-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 auto 12px;
    padding: 16px;
}

.qr-item p {
    font-size: 15px;
    color: var(--text-muted);
}

/* ============================================
   QR Code Section (Homepage)
   ============================================ */
.qr-home {
    text-align: center;
}

.qr-home img {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 auto 16px;
    background: var(--bg);
    padding: 8px;
}

.qr-home p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (min-width: 768px) {
    .qr-home img {
        max-width: 220px;
    }

    .qr-home p {
        font-size: 16px;
    }
}

/* ============================================
   Loading Page
   ============================================ */
.missing-translation {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ============================================
   Bio Language Toggle
   ============================================ */
.bio-zh {
    display: none;
}

.lang-zh .bio-en {
    display: none;
}

.lang-zh .bio-zh {
    display: block;
}

/* ============================================
   Bio HTML Content Styling
   ============================================ */
.about-text a {
    color: #1565c0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-text a:hover {
    color: #0d47a1;
}

.about-text strong,
.about-text b {
    font-weight: 600;
}

.about-text em,
.about-text i {
    font-style: italic;
}

.about-text u {
    text-underline-offset: 2px;
}

.about-text h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 20px 0 10px;
}

.about-text blockquote {
    border-left: 3px solid var(--text);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-muted);
}

.about-text ul {
    margin: 12px 0 12px 20px;
}

.about-text li {
    margin-bottom: 6px;
}

.about-text hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* ============================================
   Utility
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
