@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #09090b;
    --bg-overlay: rgba(9, 9, 11, 0.86);
    --panel-bg: rgba(15, 15, 18, 0.78);
    --panel-bg-strong: rgba(12, 12, 15, 0.94);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-strong: rgba(255, 255, 255, 0.14);
    --box-bg: rgba(255, 255, 255, 0.04);
    --box-border: rgba(255, 255, 255, 0.12);
    --timer-bg: rgba(255, 255, 255, 0.05);
    --text-color: #f4f4f5;
    --muted-color: #a1a1aa;
    --footer-color: rgba(229, 229, 232, 0.84);
    --textarea-bg: rgba(255, 255, 255, 0.04);
    --accent-color: #d4d4d8;
    --accent-strong: #fafafa;
    --accent-inverse: #09090b;
    --danger-color: #d4d4d8;
    --banner-opacity: 0.18;
    --shadow-lg: 0 32px 100px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.28);
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    height: auto;
    background-color: var(--bg-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100dvh;
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-behavior: smooth;
    line-height: 1.5;
    font-family: "Manrope", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.86rem;
    background-color: transparent;
    background-image: none;
    color: var(--text-color);
    overflow: visible;
    overscroll-behavior-y: auto;
    isolation: isolate;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background-image: url('../assets/rivesa-wallpaper.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: var(--banner-opacity);
    filter: grayscale(1) contrast(1.05) brightness(0.72) saturate(0.4);
    transform: scale(1.03);
}

body::after {
    background: linear-gradient(180deg, rgba(9, 9, 11, 0.56) 0%, rgba(9, 9, 11, 0.3) 36%, rgba(9, 9, 11, 0.58) 100%);
}

html,
body,
textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 212, 216, 0.7) rgba(9, 9, 11, 0.38);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(9, 9, 11, 0.92), rgba(15, 15, 18, 0.96));
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    border: 3px solid rgba(9, 9, 11, 0.92);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(39, 39, 42, 0.98), rgba(161, 161, 170, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(63, 63, 70, 0.98), rgba(244, 244, 245, 0.9));
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
textarea::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(212, 212, 216, 0.98));
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
textarea::-webkit-scrollbar-corner {
    background: transparent;
}

::selection {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-color);
}

.hero-banner {
    position: relative;
    width: 100%;
    min-height: 0;
    height: auto;
    flex: 1 0 auto;
    padding: 12px 14px;
    box-sizing: border-box;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    z-index: 1;
}

body.page-scroll .hero-banner {
    align-items: flex-start;
    padding-top: clamp(24px, 6vh, 56px);
    padding-bottom: clamp(24px, 6vh, 56px);
}

.hero-banner::before {
    display: none;
}

.hero-banner::after {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vh, 18px);
}

.hero-content--direct {
    margin: 0;
    padding-top: 0;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.8vh, 16px);
}

body.page-scroll .hero-content,
body.page-scroll .hero-content--direct {
    justify-content: flex-start;
}

.page-intro {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 6px 2px 0;
    text-align: center;
}

.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

.page-intro__logo--light {
    display: none;
}

.page-intro__logo--dark {
    display: block;
}

.page-intro__logo {
    width: min(114px, 68vw);
    height: auto;
    display: block;
    margin-bottom: 5px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}

.page-intro__title {
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: clamp(1.44rem, 2.6vw, 1.92rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
    font-weight: 800;
    text-wrap: balance;
}

.page-intro__text {
    margin: 0;
    max-width: 540px;
    color: var(--muted-color);
    font-size: 0.88rem;
    line-height: 1.68;
}

.view-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation-duration: 0.45s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
}

.hidden-view {
    display: none !important;
}

.fade-in-up {
    animation-name: fadeInUp;
}

.fade-in-down {
    animation-name: fadeInDown;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtleBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    10% {
        transform: translateY(-8px);
    }
    18% {
        transform: translateY(0);
    }
    24% {
        transform: translateY(-3px);
    }
    30% {
        transform: translateY(0);
    }
}

.scroll-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafafa 0%, #d4d4d8 100%);
    color: var(--accent-inverse);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
    animation: subtleBounce 3s ease infinite;
}

.scroll-btn:hover {
    animation: none;
    transform: translateY(-1px) scale(1.03);
    opacity: 0.96;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

.scroll-down-btn {
    margin-top: 10px;
}

#main-wrapper {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.upload-card,
#preview,
.info-box {
    width: 100%;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.info-box {
    width: 100%;
    max-width: none;
    margin-inline: auto;
    padding: 20px;
}

.upload-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.upload-card > h3 {
    margin-bottom: 0 !important;
}

.upload-card > .control-group {
    margin-bottom: 0;
}

.upload-card > .file-upload-control {
    margin-bottom: -26px;
}

.upload-card > .btn {
    margin-top: 0;
}

#preview {
    display: none;
    margin-top: 0;
    padding: 18px;
}

html.is-download-view #upload-section,
body.is-download-view #upload-section {
    display: none;
}

html.is-download-view #main-wrapper,
body.is-download-view #main-wrapper {
    max-width: 540px;
}

html.is-download-view #preview,
body.is-download-view #preview {
    display: block;
}

html.is-download-view body,
body.is-download-view {
    padding-bottom: 0;
}

html.is-download-view .hero-banner,
body.is-download-view .hero-banner {
    min-height: 100dvh;
}

html.is-download-view footer,
body.is-download-view footer {
    display: none;
}

.preview-return-btn {
    width: 100%;
    margin: 0 0 14px;
}

.brand-logo {
    width: min(156px, 100%);
    max-width: 156px;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}

.brand-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.brand-hero--split {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr);
    gap: 18px;
    align-items: start;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.hero-copy__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted-color);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-features {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
}

.hero-feature {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.hero-feature__bullet {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fafafa 0%, #d4d4d8 100%);
    margin-top: 6px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.hero-feature__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.hero-feature strong {
    color: var(--text-color);
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.42;
}

.hero-feature span {
    color: var(--muted-color);
    font-size: 0.76rem;
    line-height: 1.7;
}

.hero-visual {
    display: flex;
    min-width: 0;
}

.hero-visual__frame {
    position: relative;
    width: 100%;
    min-height: 320px;
    padding: 18px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.05), transparent 26%),
        radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.04), transparent 24%),
        linear-gradient(180deg, rgba(24, 24, 27, 0.98) 0%, rgba(11, 11, 13, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 50px rgba(0, 0, 0, 0.22);
}

.hero-visual__frame::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.02) 50%, transparent 52%);
    pointer-events: none;
}

.hero-visual__label {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-visual__image {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
    margin-top: 14px;
}

.control-group {
    margin-bottom: 12px;
}

.error {
    color: var(--danger-color);
    font-weight: 700;
    word-break: break-word;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.drop-zone {
    position: relative;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    padding: 16px 14px 14px;
    text-align: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    word-break: break-word;
    font-size: 0.84rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 20px rgba(0, 0, 0, 0.16);
}

.drop-zone:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.drop-zone--over {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 32px rgba(0, 0, 0, 0.24);
}

.drop-zone input {
    display: none;
}

.drop-zone-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
    color: var(--muted-color);
}

.icon-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-tooltip svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

.icon-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(9, 9, 11, 0.96);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;
}

.icon-tooltip::before {
    content: "";
    position: absolute;
    bottom: 108%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.12) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;
}

.icon-tooltip:hover::after,
.icon-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.icon-tooltip:hover svg {
    transform: translateY(-2px);
    fill: var(--accent-strong);
    stroke: var(--accent-strong);
}

#dropZonePrompt {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.65;
    font-size: 0.8rem;
}

.expiry-control {
    margin-top: 2px;
}

.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.field-header label {
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 700;
}

.field-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted-color);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.select-shell {
    position: relative;
    overflow: visible;
}

.expiry-trigger {
    position: relative;
    width: 100%;
    min-height: 40px;
    padding: 10px 42px 10px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
    outline: none;
    font: inherit;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.expiry-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
}

.expiry-trigger:focus-visible {
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 12px 24px rgba(0, 0, 0, 0.2);
}

.expiry-trigger__text {
    display: block;
    min-width: 0;
    text-align: left;
}

.expiry-shell.is-open .select-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.expiry-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(12, 12, 15, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.expiry-menu[hidden] {
    display: none !important;
}

.expiry-option {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-color);
    border-radius: 14px;
    padding: 8px 10px;
    text-align: left;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.expiry-option:hover,
.expiry-option:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.expiry-option.is-selected {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.18);
}

.select-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--muted-color);
    pointer-events: none;
}

.select-chevron svg {
    display: block;
}

.field-note {
    margin: 6px 0 0;
    color: var(--muted-color);
    font-size: 0.74rem;
    line-height: 1.7;
}

.email-fields {
    display: grid;
    gap: 14px;
}

.email-field {
    display: grid;
    gap: 8px;
}

.expiry-control > .field-note {
    margin-top: 10px;
}

.email-fields > .field-note {
    margin-top: 2px;
}

.email-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: var(--textarea-bg);
    color: var(--text-color);
    font: inherit;
    font-size: 0.82rem;
}

.email-input::placeholder {
    color: var(--muted-color);
}

.email-input:focus-visible {
    outline: none;
}

textarea {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    background: var(--textarea-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    border-radius: 12px;
    box-sizing: border-box;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    resize: none;
    font-size: 0.8rem;
    line-height: 1.55;
}

#preview h4 {
    margin-top: 0;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
}

.timer-container {
    margin: 10px 0 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
}

#fileContent img,
#fileContent embed,
#fileContent pre {
    max-width: 100%;
    box-sizing: border-box;
}

#fileContent img,
#fileContent embed {
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

#fileContent pre {
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 12px;
    max-height: none;
    overflow: visible;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#fileContent .btn,
#fileContent a.btn {
    width: 100%;
}

progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    border: none;
}

progress::-webkit-progress-bar {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, #f4f4f5, #a1a1aa);
    border-radius: 999px;
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, #f4f4f5, #a1a1aa);
    border-radius: 999px;
}

#limitContainer {
    margin-top: 12px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 700;
    margin-top: 6px;
    transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    text-decoration: none;
    min-height: 40px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(180deg, #f4f4f5 0%, #d4d4d8 100%);
    color: var(--accent-inverse);
    border: none;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
    color: var(--accent-inverse);
    background: linear-gradient(180deg, #fafafa 0%, #e4e4e7 100%);
}

button.btn-primary {
    font-family: inherit;
}

.file-meta {
    font-size: 0.76rem;
    color: var(--muted-color);
    margin-bottom: 8px;
    word-break: break-all;
}

footer {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    padding: 8px 12px;
    text-align: center;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--footer-color);
    z-index: 1;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

footer a {
    color: var(--text-color);
    text-decoration: underline;
    font-weight: 700;
}

.modal-disclaimer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    width: min(560px, 100%);
    padding: 20px;
    border-radius: 18px;
    color: var(--text-color);
    background: rgba(15, 15, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.close-disclaimer {
    position: absolute;
    top: 10px;
    right: 14px;
    color: var(--muted-color);
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
}

.close-disclaimer:hover {
    color: var(--text-color);
}

#viewBanner .info-box {
    background: linear-gradient(180deg, rgba(12, 12, 15, 0.94), rgba(9, 9, 11, 0.9)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(22px) !important;
    -webkit-backdrop-filter: blur(22px) !important;
}

html[data-theme="light"] {
    --bg-color: #f4f6f8;
    --panel-bg: rgba(255, 255, 255, 0.88);
    --panel-bg-strong: rgba(255, 255, 255, 0.96);
    --panel-border: rgba(15, 23, 42, 0.12);
    --panel-border-strong: rgba(15, 23, 42, 0.18);
    --box-bg: rgba(15, 23, 42, 0.04);
    --box-border: rgba(15, 23, 42, 0.14);
    --timer-bg: rgba(15, 23, 42, 0.05);
    --text-color: #172033;
    --muted-color: #64748b;
    --footer-color: #475569;
    --textarea-bg: rgba(255, 255, 255, 0.9);
    --accent-color: #475569;
    --accent-strong: #0f172a;
    --danger-color: #b42318;
    --banner-opacity: 0.12;
    --shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.14);
    --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] body {
    background-color: transparent;
    background-image: none;
}

html[data-theme="light"] .hero-banner {
    background: transparent;
}

html[data-theme="light"] body::before {
    filter: grayscale(1) contrast(1.02) brightness(1.08) saturate(0.28);
}

html[data-theme="light"] body::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.24) 42%, rgba(244, 246, 248, 0.58) 100%);
}

html[data-theme="light"] .hero-banner::before {
    filter: grayscale(1) contrast(1.02) brightness(1.08) saturate(0.28);
}

html[data-theme="light"] .hero-banner::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.24) 42%, rgba(244, 246, 248, 0.58) 100%);
}

html[data-theme="light"] .page-intro__logo--light {
    display: block;
}

html[data-theme="light"] .page-intro__logo--dark {
    display: none;
}

html[data-theme="light"] .page-intro__title {
    background: linear-gradient(135deg, #09090b 0%, #475569 100%);
    background-clip: text;
    -webkit-background-clip: text;
}

html[data-theme="dark"] .page-intro__logo--light {
    display: none;
}

html[data-theme="dark"] .page-intro__logo--dark {
    display: block;
}

html[data-theme="light"] .theme-toggle {
    border-color: rgba(0, 0, 0, 0.18);
    background: #ffffff;
    color: #09090b;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .theme-toggle:hover {
    background: #f4f4f5;
    border-color: rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .drop-zone {
    border-color: rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 8px 20px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .drop-zone:hover,
html[data-theme="light"] .drop-zone--over {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(15, 23, 42, 0.34);
}

html[data-theme="light"] .expiry-trigger {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.94));
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .expiry-trigger:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.28);
}

html[data-theme="light"] .expiry-trigger:focus-visible {
    border-color: rgba(15, 23, 42, 0.34);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .expiry-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: var(--shadow-lg);
}

html[data-theme="light"] .expiry-option:hover,
html[data-theme="light"] .expiry-option:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .expiry-option.is-selected {
    background: rgba(15, 23, 42, 0.09);
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .email-input,
html[data-theme="light"] textarea {
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .timer-container,
html[data-theme="light"] #limitContainer,
html[data-theme="light"] #fileContent pre {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] progress::-webkit-progress-bar {
    background-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] progress::-webkit-progress-value,
html[data-theme="light"] progress::-moz-progress-bar {
    background: linear-gradient(90deg, #334155, #94a3b8);
}

html[data-theme="light"] .btn {
    border-color: rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .btn:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .btn-primary {
    color: #ffffff;
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .btn-primary:hover {
    color: #ffffff;
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
}

html[data-theme="light"] footer {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html[data-theme="light"] .upload-card,
html[data-theme="light"] #preview,
html[data-theme="light"] .info-box,
html[data-theme="light"] #viewBanner .info-box {
    box-shadow: none !important;
}

html[data-theme="light"] .modal-disclaimer {
    background-color: rgba(15, 23, 42, 0.32);
}

html[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: var(--shadow-lg);
}

html[data-theme="light"] #viewBanner .info-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.94)) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
}

@media (min-width: 960px) {
    .brand-hero--split {
        grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
        align-items: center;
    }
}

@media (max-width: 1100px) {
    .brand-logo {
        max-width: 152px;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 10px 12px;
    }

    .hero-content {
        width: min(100%, 680px);
    }

    .hero-content--direct {
        gap: 14px;
    }

    .info-box,
    .upload-card,
    #preview {
        padding: 16px;
        border-radius: 16px;
    }

    .info-box {
        width: 100%;
    }

    .page-intro__title {
        font-size: clamp(1.26rem, 7.4vw, 1.64rem);
    }

    .page-intro__logo {
        width: min(102px, 58vw);
    }

    .brand-logo {
        max-width: 146px;
    }

    .scroll-btn {
        width: 38px;
        height: 38px;
    }

    .hero-visual__frame {
        min-height: 260px;
    }

    html.is-download-view #main-wrapper,
    body.is-download-view #main-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .btn,
    button.btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .page-intro__title {
        font-size: clamp(1.18rem, 8.4vw, 1.48rem);
    }

    .page-intro__logo {
        width: min(92px, 56vw);
    }

    .page-intro__text {
        font-size: 0.8rem;
        line-height: 1.58;
    }

    .hero-feature {
        padding: 11px 12px;
    }

    .hero-visual__frame {
        min-height: 220px;
        padding: 14px;
    }

    .hero-visual__label {
        top: 16px;
        left: 16px;
    }
}

/* Opções de expiração em linha */
.expiry-control {
    border: 0;
    padding: 0;
}

.expiry-control legend {
    padding: 0;
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.expiry-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 4px;
}

.expiry-option {
    position: relative;
    min-width: 0;
    min-height: 42px;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.expiry-option:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.24);
}

.expiry-option.is-selected {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.3);
}

.expiry-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.expiry-option:focus-within {
    border-color: var(--accent-color);
}

.expiry-option__control {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid var(--muted-color);
    border-radius: 50%;
}

.expiry-option__control::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-strong);
    transform: scale(0);
    transition: transform 0.16s ease;
}

.expiry-option.is-selected .expiry-option__control {
    border-color: var(--accent-strong);
}

.expiry-option.is-selected .expiry-option__control::after {
    transform: scale(1);
}

.expiry-option__text {
    min-width: 0;
    white-space: nowrap;
}

html[data-theme="light"] .expiry-option {
    border-color: rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] .expiry-option:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.26);
}

html[data-theme="light"] .expiry-option.is-selected {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.3);
}
