/* Hallmark · macrostructure: Split Studio · genre: atmospheric · theme: Midnight (Douyin red accent)
 * pre-emit critique: P5 H5 E4 S5 R5 V5
 * audience: public Douyin users · use: media download · tone: direct, focused
 * nav: N1b (four requested tools) · footer: Ft1 · enrichment: none — format typography
 * axes: dark / geometric-sans / warm · motion: press, loading indicator · no decorative imagery
 */
@import url('douyin-tokens.css');
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
svg { width: 22px; height: 22px; flex-shrink: 0; }
h1, h2, h3 { font-family: var(--font-display); font-style: normal; line-height: 1.18; letter-spacing: -.035em; overflow-wrap: anywhere; min-width: 0; margin: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; }
p { margin: 0; }
.container { width: min(100%, 1248px); margin-inline: auto; padding-inline: var(--page-gutter); }
.site-header { background: var(--color-paper); }
.header-inner { display: flex; align-items: center; gap: var(--space-xl); min-height: 104px; }
.brand, .navbar-logo { display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0; font-size: 1.5rem; letter-spacing: -.05em; font-weight: 750; white-space: nowrap; }
.brand-symbol { display: inline-flex; align-items: center; justify-content: center; color: var(--color-accent); width: 32px; height: 36px; }
.brand-symbol svg { width: 32px; height: 32px; }
.brand-image { object-fit: contain; }
.brand-caption { display: none; }
.main-navigation { display: flex; justify-content: center; align-items: center; gap: clamp(.8rem, 1.8vw, 1.6rem); margin-inline: auto; }
.main-navigation a { color: var(--color-muted); font-size: .84rem; padding-block: .7rem; white-space: nowrap; }
.main-navigation a:hover, .main-navigation a[aria-current] { color: var(--color-ink); }
.main-navigation a[aria-current] { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 10px; }
.language-menu { position: relative; margin-left: auto; }
.language-menu summary { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; cursor: pointer; font-size: .85rem; line-height: 1; padding: .65rem .8rem; border-radius: 10px; background: var(--color-paper-2); list-style: none; white-space: nowrap; }
summary::-webkit-details-marker { display: none; }
.language-menu summary svg { display: block; width: 17px; height: 17px; }
.language-menu summary .chevron { width: 12px; height: 12px; color: var(--color-muted); }
.language-options { position: absolute; right: 0; top: calc(100% + 10px); display: grid; min-width: 180px; padding: 8px; background: var(--color-paper-3); border: 1px solid var(--color-rule); border-radius: 12px; z-index: 5; box-shadow: 0 15px 30px var(--color-shadow); }
.language-options a { padding: .65rem .8rem; font-size: .9rem; border-radius: 6px; white-space: nowrap; }
.language-options a:hover, .language-options a[aria-current] { background: var(--color-paper); color: var(--color-accent); }
.menu-toggle { display: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: 4rem 5rem; }
.hero-note { display: flex; align-items: center; gap: .6rem; font-size: .83rem; color: var(--color-muted); margin-bottom: 1.5rem; }
.hero-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
h1 { font-size: var(--text-display); font-weight: 750; max-width: 650px; }
.hero-description { color: var(--color-muted); font-size: 1rem; line-height: 1.8; margin-top: 1.35rem; max-width: 580px; }
.download-workspace { margin-top: 2rem; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .65rem; }
.url-field { display: flex; gap: .75rem; align-items: center; border: 1px solid var(--color-field-rule); background: var(--color-field); border-radius: 12px; padding: .6rem .65rem .6rem 1rem; min-width: 0; }
.url-field:focus-within { border-color: var(--color-focus); }
.url-field > svg { color: var(--color-muted); width: 20px; height: 20px; }
.url-field input { width: 100%; min-width: 0; flex: 1; color: var(--color-ink); background: none; border: 0; padding-block: .5rem; font-size: .95rem; }
.url-field input::placeholder { color: var(--color-muted); opacity: 1; }
.url-field input:focus { outline: none; }
.url-field:has([aria-invalid='true']) { border-color: var(--color-error); }
.paste-button { display: inline-flex; gap: .4rem; align-items: center; justify-content: center; color: var(--color-ink); background: var(--color-paper-3); border: 0; border-radius: 7px; padding: .6rem .7rem; font-size: .8rem; flex-shrink: 0; white-space: nowrap; }
.paste-button:hover { background: var(--color-rule); }
.paste-button svg { width: 16px; height: 16px; }
.download-button { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; margin-top: .85rem; min-height: 54px; padding: .9rem 1.3rem; border: 0; border-radius: 11px; background: var(--color-accent); color: var(--color-accent-ink); font-weight: 750; font-size: 1rem; white-space: nowrap; transition: background-color 180ms var(--ease-out), transform 100ms var(--ease-out); }
.download-button:hover { background: var(--color-accent-hover); }
.download-button:active, .paste-button:active { transform: scale(.985); }
.download-button.is-loading svg { animation: downloading 1s linear infinite; }
@keyframes downloading { 50% { transform: translateY(3px); opacity: .5; } }
.form-help { margin-top: 1rem; font-size: .75rem; line-height: 1.8; color: var(--color-muted); }
.download-status:empty { display: none; }
.download-status { padding: .9rem 1rem; margin-top: 1rem; border-radius: 10px; background: var(--color-paper-2); color: var(--color-muted); font-size: .9rem; }
.download-status.is-error { color: var(--color-error); }
.download-status.is-success { color: var(--color-success); }
.format-panel { min-width: 0; border-radius: 24px; padding: 1.7rem; background: var(--color-paper-2); }
.format-panel-top { display: flex; justify-content: space-between; color: var(--color-muted); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; }
.format-panel-top span:last-child { letter-spacing: .2em; }
.format-display { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding-top: 1.5rem; }
.format-display svg { width: 44px; height: 44px; color: var(--color-accent); stroke-width: 1.1; }
.format-display > span { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1.25; letter-spacing: -.06em; }
.format-caption { color: var(--color-muted); font-size: .85rem; text-align: center; margin-bottom: 2rem; }
.format-switcher { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.format-switcher a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; border-radius: 10px; padding: .85rem .15rem; color: var(--color-muted); font-size: .73rem; white-space: nowrap; }
.format-switcher a:hover { color: var(--color-ink); background: var(--color-paper-3); }
.format-switcher a[aria-current] { color: var(--color-accent); background: var(--color-accent-soft); }
.format-switcher svg { width: 20px; height: 20px; }
.format-footnote { display: flex; justify-content: space-between; align-items: center; color: var(--color-muted); font-size: .74rem; margin-top: 1.7rem; }
.steps-section { padding-block: var(--space-2xl) var(--space-3xl); }
.section-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; margin-bottom: 2.5rem; }
.section-heading h2 { font-size: 1.65rem; }
.section-heading p { font-size: .85rem; color: var(--color-muted); max-width: 270px; }
.steps-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; gap: 2rem; padding: 0; margin: 0; }
.steps-list li { display: flex; gap: 1rem; align-items: flex-start; }
.step-number { font-family: var(--font-mono); font-size: .78rem; color: var(--color-accent); border-radius: 9px; background: var(--color-paper-2); padding: .6rem; line-height: 1; }
.steps-list h3 { margin-bottom: .7rem; }
.steps-list p, .about-copy p, .offers-list p { font-size: .9rem; line-height: 1.9; color: var(--color-muted); }
.about-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 7vw, 7rem); padding-block: var(--space-3xl); }
.about-copy { align-self: center; }
.about-copy h2 { max-width: 370px; margin-bottom: 1.5rem; }
.tool-list { min-width: 0; }
.small-heading { font-size: 1rem; margin-bottom: 1.2rem; letter-spacing: -.01em; }
.tool-list a { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--color-rule); }
.tool-list a:last-child { border-bottom: 0; }
.tool-list a > span:nth-child(2) { min-width: 0; flex: 1; }
.tool-list strong { display: block; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.tool-list a:hover strong, .tool-list a > span:last-child { color: var(--color-accent); }
.tool-description { color: var(--color-muted); font-size: .8rem; display: block; margin-top: .3rem; }
.tool-icon { display: grid; place-items: center; flex-shrink: 0; background: var(--color-paper-2); border-radius: 12px; width: 45px; height: 45px; }
.offers-section { padding-block: var(--space-3xl); }
.offers-section > h2 { font-size: 1.7rem; margin-bottom: 2.5rem; }
.offers-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.check-mark { display: inline-flex; color: var(--color-accent); margin-bottom: 1rem; }
.offers-list h3 { margin-bottom: .8rem; }
.article-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; padding-block: var(--space-3xl); }
.article-section h2 { font-size: 1.7rem; }
.prose { min-width: 0; color: var(--color-muted); line-height: 1.9; overflow-wrap: anywhere; }
.prose p + p { margin-top: 1rem; }
.prose h2, .prose h3 { color: var(--color-ink); margin-block: 2rem 1rem; font-size: 1.3rem; }
.prose img { max-width: 100%; height: auto; }
.prose a { color: var(--color-accent); text-decoration: underline; }
.faq-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; padding-block: var(--space-3xl) 6rem; }
.faq-section > h2 { font-size: 1.7rem; }
.faq-list details { border-bottom: 1px solid var(--color-rule); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 1.2rem 0; list-style: none; gap: 1.3rem; font-weight: 500; font-size: .95rem; }
.faq-list details:first-child summary { padding-top: 0; }
.faq-list summary span { font-size: 1.5rem; color: var(--color-accent); font-weight: 400; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list p { color: var(--color-muted); font-size: .88rem; line-height: 1.9; padding-bottom: 1.5rem; }
.site-footer { background: var(--color-paper-2); padding-block: 3rem 2rem; }
.footer-main { display: flex; justify-content: space-between; gap: 3rem; align-items: flex-start; }
.footer-main > div > p { color: var(--color-muted); max-width: 450px; font-size: .8rem; margin-top: 1rem; }
.footer-main nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1.3rem; font-size: .8rem; color: var(--color-muted); padding-top: .5rem; }
.footer-main nav a { white-space: nowrap; }
.footer-main nav a:hover { color: var(--color-ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; color: var(--color-muted); font-size: .72rem; }
.footer-bottom p:first-child { max-width: 650px; }
.footer-bottom p:last-child { flex-shrink: 0; }
.static-page { max-width: 950px; padding-block: 4rem 6rem; min-height: 55vh; }
.static-page h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.static-description { color: var(--color-muted); margin-block: 1.5rem 2.5rem; }
.contact-panel { max-width: 550px; margin-bottom: 2rem; }
.download-results:empty { display: none; }
.result-card { background: var(--color-paper-2); padding: 1.2rem; border-radius: 12px; margin-top: 1rem; }
.result-card h2 { font-size: 1.1rem; line-height: 1.5; letter-spacing: -.015em; }
.result-card p { color: var(--color-muted); margin-top: .4rem; font-size: .8rem; }
.result-preview { margin-top: 1.2rem; min-width: 0; }
.result-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--color-muted); font-size: .75rem; margin-bottom: .65rem; }
.result-preview-heading span:last-child:not(:first-child) { font-family: var(--font-mono); }
.result-video, .result-cover { display: block; width: 100%; max-height: 420px; aspect-ratio: 16 / 9; object-fit: contain; background: var(--color-paper); border-radius: 8px; }
.result-audio { display: block; width: 100%; margin-top: .75rem; color-scheme: dark; }
.result-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .65rem; }
.result-photos img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; background: var(--color-paper); }
.result-photos img[hidden], .result-preview-error[hidden] { display: none; }
.result-card .result-preview-error { margin-top: .75rem; line-height: 1.7; }
.result-links { display: grid; gap: .65rem; margin-top: 1rem; }
.result-links a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; border-radius: 8px; font-weight: 600; font-size: .85rem; background: var(--color-paper-3); }
.result-links a:hover { background: var(--color-rule); }
.result-links a span { color: var(--color-accent); }
.result-reset { color: var(--color-muted); border: 0; background: none; padding: 1rem 0 0; font-size: .8rem; text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1100px) { html[lang='vi'] .header-inner, html[lang='id'] .header-inner { gap: 1rem; } html[lang='vi'] .main-navigation, html[lang='id'] .main-navigation { gap: 1.2rem; } }
@media (max-width: 1050px) {
    .header-inner { flex-wrap: wrap; gap: 0; padding-block: 1.2rem; min-height: 80px; }
    .main-navigation { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 2rem; padding-top: 1rem; }
    .main-navigation a { font-size: .8rem; }
    .hero { padding-top: 2rem; gap: 2rem; }
    .format-panel { padding: 1.25rem; }
    .format-display { min-height: 180px; }
    .steps-list { gap: 1.25rem; }
    .footer-main { gap: 1.5rem; }
}
@media (max-width: 800px) {
    .hero { grid-template-columns: minmax(0, 1fr); padding-block: 2rem 3rem; }
    .hero-content { max-width: 650px; }
    .format-panel { padding: 1.5rem; }
    .format-display { min-height: 140px; }
    .format-display > span { font-size: 4.5rem; }
    .format-caption { margin-bottom: 1rem; }
    .format-footnote { margin-top: 1rem; }
    .format-switcher a { flex-direction: row; gap: .5rem; padding: .8rem .2rem; }
    .section-heading { display: block; }
    .section-heading p { margin-top: 1rem; max-width: none; }
    .steps-list { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .about-section, .article-section, .faq-section { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .about-copy h2 { max-width: none; }
    .offers-list { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .about-section, .offers-section, .article-section, .faq-section { padding-block: 2.5rem; }
    .steps-section { padding-bottom: 2.5rem; }
    .footer-main, .footer-bottom { flex-direction: column; gap: 1.5rem; }
    .footer-main nav { justify-content: flex-start; }
    .footer-bottom { margin-top: 2rem; }
    .footer-bottom p:last-child { flex-shrink: 1; }
}
@media (max-width: 600px) {
    .header-inner { column-gap: .5rem; position: relative; }
    .brand { font-size: 1.3rem; }
    .brand-symbol { width: 27px; }
    .menu-toggle { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; background: none; border: 0; padding: .6rem .2rem; color: var(--color-muted); font-size: .8rem; }
    .menu-toggle svg { width: 19px; height: 19px; }
    .language-menu { margin-left: 0; }
    .language-menu summary { padding: .5rem; gap: .4rem; }
    .language-menu .chevron { display: none; }
    .main-navigation { display: none; padding-block: .8rem .2rem; }
    .is-open .main-navigation { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
    .main-navigation a { padding: .8rem .6rem; border-radius: 8px; font-size: .85rem; }
    .main-navigation a[aria-current] { text-decoration: none; background: var(--color-paper-2); color: var(--color-accent); }
    h1 { font-size: clamp(2.2rem, 8.5vw, 3.2rem); }
    .hero-note { margin-bottom: 1rem; font-size: .75rem; }
    .hero-description { font-size: .93rem; margin-top: 1rem; }
    .url-field { gap: .5rem; padding-left: .75rem; }
    .url-field > svg { display: none; }
    .url-field input { font-size: 1rem; }
    .paste-button { padding: .65rem; }
    .paste-button svg { display: none; }
    .format-display { min-height: 130px; }
    .format-switcher a { flex-direction: column; }
    .tool-list strong { font-size: .82rem; }
    .tool-list a { gap: .7rem; }
    .tool-icon { width: 36px; height: 40px; }
    .footer-main nav { gap: 1rem; font-size: .75rem; }
    .static-page { padding-block: 2rem 3rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
