/* =========================================================================
 * Polaris Files · 全局样式
 * 设计语言：黑白色调 + 毛玻璃 + 共享自 that-weiyang-home 的细节
 * - 卡片背景由白色基底改为与 home 一致的 rgba(0,0,0,.25) 风格
 * - 所有粉/蓝/绿色渐变按钮已替换为黑白色调
 * - 原生 .notification 已弃用，由 iziToast 接管
 * - 新增 footer（与 home 页脚一致：底部固定、毛玻璃、46px）
 * ========================================================================= */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

*:focus {
    outline: none !important;
}

button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: none !important;
    box-shadow: none !important;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

body {
    font-family: 'MiSans', 'SF Pro Display', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: #000;
    color: rgba(255, 255, 255, 0.92);
    overflow-x: hidden;
    min-height: 100vh;
}

/* 全局过渡 */
a {
    text-decoration: none;
    transition: 0.3s;
    color: rgba(255, 255, 255, 0.92);
}

a:hover {
    color: #ffffff;
}

/* 图片背景 */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #000;
}

.background-gradient img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 借鉴 that-weiyang-home：默认模糊+轻微放大，加载完成后过渡到清晰 */
    filter: blur(10px);
    transform: scale(1.10);
    will-change: transform, filter;
    opacity: 0;
    transition: opacity 1s ease, filter 1.5s ease, transform 1.5s ease;
}

.background-gradient img.loaded {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
}

.background-gradient img.loaded-sharp {
    filter: blur(0px) brightness(1) !important;
    transform: scale(1) !important;
}

.background-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .5) 100%),
        radial-gradient(rgba(0, 0, 0, 0) 33%, rgba(0, 0, 0, .3) 166%);
    pointer-events: none;
}

.preload-bg {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

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

/* 顶部导航栏 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 0;
}

.top-bar .container {
    max-width: none;
    margin: 0;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.logo .brand {
    font-family: 'Pacifico-1', cursive;
    font-size: 22px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.92);
}

.logo .brand-tag {
    font-family: 'MiSans', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    margin-left: 6px;
}

.logo i {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.92);
}

.logo:hover {
    transform: scale(1.04);
}

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

.nav-btn,
.search-btn,
.home-btn,
.security-btn,
.header-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 10px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    min-width: 40px;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-btn:hover,
.search-btn:hover,
.home-btn:hover,
.security-btn:hover,
.header-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.05);
}

.header-btn.logout,
.header-btn.danger {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-btn.logout:hover,
.header-btn.danger:hover {
    background: rgba(255, 255, 255, 0.18);
}

.wallpaper-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.wallpaper-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.wallpaper-btn.active {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* 主内容区域 */
.main-content {
    margin-top: 90px;
    padding: 40px 0 80px 0;
    min-height: calc(100vh - 46px);
}

/* 通用卡片 (借鉴 home .cards 风格) */
.upload-section,
.upload-result,
.file-share-section,
.verify-section,
.error-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.upload-card,
.result-card,
.file-card,
.verify-card,
.error-card {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    margin: 0 auto;
    transition: 0.5s;
}

.upload-card:hover,
.result-card:hover,
.file-card:hover,
.verify-card:hover,
.error-card:hover {
    transform: scale(1.005);
}

/* 上传区域 */
.upload-header {
    text-align: center;
    margin-bottom: 32px;
}

.upload-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.upload-header .tagline {
    font-family: 'Pacifico-1', cursive;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: inline-block;
}

.upload-header p {
    font-size: 14px;
    color: rgba(235, 235, 245, 0.6);
}

/* 文件拖拽区域 */
.file-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-drop-zone:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.04);
}

.file-drop-zone.dragover {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 16px;
}

.file-drop-zone h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.file-drop-zone p {
    font-size: 14px;
    color: rgba(235, 235, 245, 0.6);
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

/* 通用按钮 (黑白色调) */
.btn,
.select-file-btn,
.upload-btn,
.search-submit-btn,
.verify-btn,
.share-btn,
.new-upload-btn,
.action-btn,
.copy-btn,
.btn-primary,
.btn-secondary,
.modal-btn-confirm,
.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.select-file-btn:hover,
.upload-btn:hover:not(:disabled),
.search-submit-btn:hover,
.verify-btn:hover,
.share-btn:hover,
.new-upload-btn:hover,
.action-btn:hover,
.copy-btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.modal-btn-confirm:hover,
.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.32);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn:active,
.select-file-btn:active,
.upload-btn:active,
.search-submit-btn:active,
.verify-btn:active,
.share-btn:active,
.new-upload-btn:active,
.action-btn:active,
.copy-btn:active {
    transform: scale(0.97);
}

.btn:disabled,
.upload-btn:disabled,
.verify-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* 文件信息显示 */
.file-info {
    margin-bottom: 24px;
}

.file-preview {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 48px;
    overflow: hidden;
}

.file-icon {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 24px;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.file-name {
    display: block;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    display: block;
    font-size: 14px;
    color: rgba(235, 235, 245, 0.6);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-file-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* 配置选项 */
.upload-options {
    margin-bottom: 32px;
}

.option-group {
    margin-bottom: 24px;
}

.option-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.password-section {
    flex: 2;
}

.expire-section {
    flex: 1;
    min-width: 150px;
}

.encryption-section {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.encryption-section label {
    margin-bottom: 8px;
    height: 24px;
    display: flex;
    align-items: center;
}

/* 密码输入框容器 */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input,
.option-input,
.option-select,
.modal-input,
.auth-input,
.search-input,
.share-link-input,
.extract-code-input,
.extract-code-display,
.security-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.password-input {
    padding-right: 50px;
    height: 48px;
}

.option-input,
.option-select {
    height: 48px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.option-input:focus,
.option-select:focus,
.password-input:focus,
.modal-input:focus,
.auth-input:focus,
.search-input:focus,
.share-link-input:focus,
.extract-code-input:focus,
.security-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.14);
}

.password-input::placeholder,
.option-input::placeholder,
.modal-input::placeholder,
.auth-input::placeholder,
.search-input::placeholder,
.share-link-input::placeholder,
.extract-code-input::placeholder,
.security-input::placeholder {
    color: rgba(235, 235, 245, 0.45);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.option-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.65)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.option-select option {
    background: rgba(0, 0, 0, 0.92);
    color: rgba(255, 255, 255, 0.95);
}

.option-select::-ms-expand {
    display: none;
}

/* 提取码开关 */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    height: 48px;
}

.extract-code-switch {
    display: none;
}

.switch-label {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.switch-slider {
    position: absolute;
    top: 50%;
    left: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%);
}

.extract-code-switch:checked + .switch-label {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.55);
}

.extract-code-switch:checked + .switch-label .switch-slider {
    transform: translateX(24px) translateY(-50%);
    background: #ffffff;
}

.switch-text {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.switch-label:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

.extract-code-switch:checked ~ .switch-text {
    color: rgba(255, 255, 255, 0.95);
}

/* 自定义下拉菜单 */
.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    height: 48px;
    box-sizing: border-box;
}

.select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.14);
}

.select-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    transition: transform 0.3s ease;
}

.custom-select.active .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin-top: 4px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.custom-select.active .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-option:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.select-option.selected {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.option-hint {
    display: block;
    font-size: 12px;
    color: rgba(235, 235, 245, 0.5);
}

/* 上传按钮 (黑白) */
.upload-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

/* 进度条 */
.upload-progress {
    margin-bottom: 16px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: rgba(255, 255, 255, 0.85);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: rgba(235, 235, 245, 0.7);
    text-align: center;
    display: block;
}

/* 上传结果 */
.result-header {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.success-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
}

.result-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-align: center;
}

.share-link-section {
    margin-bottom: 24px;
    text-align: left;
}

.share-link-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.link-container {
    display: flex;
    gap: 8px;
    overflow: hidden;
}

.share-link-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-link-input:focus {
    border-color: rgba(255, 255, 255, 0.16);
}

.file-id-section {
    margin-bottom: 24px;
}

.file-id-section label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    text-align: left;
}

.file-id-note {
    display: block;
    font-size: 14px;
    color: rgba(235, 235, 245, 0.55);
    margin-top: 8px;
    text-align: left;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.result-info {
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: rgba(235, 235, 245, 0.65);
    font-size: 14px;
}

/* 搜索面板 */
/* 搜索弹窗 —— 配色 + 模糊完全对齐 about-dialog / about-content
 * 外层 search-panel 抄袭 about-dialog（home qr-modal）
 * 内层 search-content 抄 about-content（home qr-modal-content） */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, backdrop-filter 0.35s ease;
}

.search-panel.active {
    opacity: 1;
    visibility: visible;
}

.search-content {
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.1) translate(200px, -200px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.4s ease;
    transform-origin: top right;
}

.search-panel.active .search-content {
    transform: scale(1) translate(0, 0);
    opacity: 1;
}

.search-panel.closing .search-content {
    transform: scale(0.1) translate(200px, -200px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.search-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.close-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.1);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.search-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-button-container {
    display: flex;
    justify-content: flex-end;
}

.search-input {
    padding: 14px 16px;
    font-size: 16px;
}

/* 搜索提交按钮 —— 默认 40px 圆形，PC 端 hover 拉长为胶囊 + 文字"全站搜索"滑出 */
.search-submit-btn {
    width: 40px;
    height: 40px;
    min-width: 0;
    padding: 0;
    border-radius: 50%;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s ease,
                border-color 0.3s ease;
}

.search-submit-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-submit-text {
    max-width: 0;
    opacity: 0;
    transform: translateX(-6px);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease 0.08s,
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PC 端：hover 拉长 + 文字滑出
 * 左右内边距都用 padding-left/right = 18px，让 icon 与文字到按钮两边的距离对称（≈18px） */
@media (hover: hover) and (pointer: fine) {
    .search-submit-btn:hover {
        width: 156px;
        border-radius: 24px;
        padding: 0 18px;
        gap: 6px;
    }

    .search-submit-btn:hover .search-submit-text {
        max-width: 120px;
        opacity: 1;
        transform: translateX(0);
    }
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.search-results.expanding {
    animation: expandResults 0.4s ease-out;
}

@keyframes expandResults {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 400px;
        opacity: 1;
    }
}

.search-result-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.14);
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
    overflow: hidden;
}

.result-item-info-group {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.result-item-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-item-info {
    font-size: 12px;
    color: rgba(235, 235, 245, 0.65);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.result-action-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.result-action-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* 文件分享页面 */
.file-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.file-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.85);
}

.file-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    word-break: break-all;
}

.file-subtitle {
    font-size: 14px;
    color: rgba(235, 235, 245, 0.65);
}

.detail-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.detail-item.full-width {
    flex: none;
    width: 100%;
}

.detail-item i {
    color: rgba(255, 255, 255, 0.78);
    width: 16px;
}

.detail-label {
    font-size: 14px;
    color: rgba(235, 235, 245, 0.65);
    margin-right: auto;
}

.detail-value {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.expire-time {
    font-family: 'Courier New', monospace;
}

.countdown {
    color: rgba(255, 255, 255, 0.9);
}

.download-section {
    margin-bottom: 24px;
}

.download-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.action-btn {
    padding: 10px 16px;
    font-size: 14px;
}

.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.security-notice i {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2px;
}

.notice-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
}

.notice-content p {
    font-size: 12px;
    color: rgba(235, 235, 245, 0.65);
    line-height: 1.4;
}

/* 错误页面 */
.error-section {
    align-items: center;
    min-height: 60vh;
}

.error-card {
    text-align: center;
    max-width: 800px;
}

.error-icon {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.error-content h1 {
    font-size: 26px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
}

.error-message {
    font-size: 15px;
    color: rgba(235, 235, 245, 0.65);
    margin-bottom: 32px;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 验证卡 */
.verify-card {
    max-width: 500px;
    text-align: center;
}

.verify-header {
    margin-bottom: 32px;
}

.verify-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.verify-icon i {
    font-size: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.verify-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.verify-subtitle {
    font-size: 15px;
    color: rgba(235, 235, 245, 0.65);
    margin-bottom: 0;
}

.extract-code-section {
    margin-bottom: 32px;
}

.extract-code-input-group {
    width: 100%;
    max-width: 100%;
}

.extract-code-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-align: left;
}

.extract-code-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    width: 100%;
    max-width: 100%;
}

.extract-code-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 20px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.extract-code-hint {
    display: block;
    font-size: 13px;
    color: rgba(235, 235, 245, 0.55);
    text-align: left;
    margin-top: 8px;
}

.extract-code-display {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

.extract-code-display:focus {
    border-color: rgba(255, 255, 255, 0.16);
}

.extract-code-note {
    display: block;
    font-size: 13px;
    color: rgba(235, 235, 245, 0.55);
    margin-top: 8px;
    text-align: left;
}

/* 模态框（黑白色调） */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 8px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.1);
}

.modal-body {
    padding: 0 24px 24px 24px;
}

.modal-body p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.password-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.modal-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
}

.verify-btn {
    padding: 12px 18px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 关于对话框 —— 整层配色 + 模糊完全照抄 that-weiyang-home/css/style.css 第 987-1002 行 */
.about-dialog,
.version-report-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, backdrop-filter 0.35s ease;
}

.version-report-dialog {
    z-index: 10001;
    background-color: rgba(0, 0, 0, 0.45);
}

.about-dialog.active,
.version-report-dialog.active {
    opacity: 1;
    visibility: visible;
}

.about-content,
.version-report-content {
    /* 配色 + 模糊 完全照抄 that-weiyang-home/css/style.css 第 1010-1016 行
     * 关键：background 改为 transparent，由外层 about-dialog 的 backdrop-filter 撑起毛玻璃 */
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    transform: scale(0.1) translate(-200px, -200px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top left;
}

.version-report-content {
    max-width: 320px;
    padding: 24px;
    transform: scale(0.3);
}

.about-dialog.active .about-content,
.version-report-dialog.active .version-report-content {
    transform: scale(1) translate(0, 0);
    opacity: 1;
}

.about-dialog.closing .about-content,
.version-report-dialog.closing .version-report-content {
    transform: scale(0.1) translate(-200px, -200px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

.version-report-dialog.closing .version-report-content {
    transform: scale(0.3);
}

.about-header,
.version-report-header {
    position: absolute;
    top: 16px;
    right: 16px;
}

.about-body {
    padding-top: 16px;
}

.avatar-section {
    margin-bottom: 24px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.developer-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 16px 0;
}

.developer-info .brand-name {
    font-family: 'Pacifico-1', cursive;
    color: rgba(255, 255, 255, 0.95);
}

.version-info {
    margin-bottom: 24px;
}

.version-info p {
    font-size: 14px;
    color: rgba(235, 235, 245, 0.65);
    margin: 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.version-number {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    border-radius: 8px;
    display: inline-block;
}

.version-number:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.version-number:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.version-title {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 20px 0;
    text-align: center;
}

.update-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.update-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.update-item:hover {
    transform: translateX(4px);
}

.update-item i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    width: 16px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.update-item span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .top-bar .container {
        padding: 0 16px;
    }

    .upload-card,
    .result-card,
    .file-card,
    .error-card {
        padding: 24px 20px;
        margin: 0 auto;
        width: calc(100% - 32px);
        max-width: 800px;
    }

    .upload-header h1 {
        font-size: 24px;
    }

    .file-drop-zone {
        padding: 32px 16px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .option-row {
        flex-direction: column;
        gap: 16px;
    }

    .password-section,
    .expire-section {
        flex: none;
        width: 100%;
        min-width: auto;
    }

    .file-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .file-icon-large {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .file-title h1 {
        font-size: 20px;
    }

    .detail-row {
        flex-direction: column;
        gap: 8px;
    }

    .share-actions {
        flex-direction: column;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .search-content {
        margin: 20px;
        padding: 24px 20px;
    }

    .search-form {
        gap: 12px;
    }

    .search-inputs {
        gap: 10px;
    }

    .search-input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .search-submit-btn {
        width: 40px;
        height: 40px;
        min-width: 0;
        padding: 0;
        margin: 0;
    }

    .modal-content {
        margin: 16px;
        max-width: none;
    }

    .password-input-group {
        flex-direction: column;
    }

    .verify-btn {
        justify-content: center;
    }

    .version-report-content {
        padding: 20px;
        max-width: 95%;
    }

    .version-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .update-item span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-top: 76px;
        padding: 20px 0 80px 0;
    }

    .top-bar {
        padding: 10px 0;
    }

    .logo {
        font-size: 18px;
    }

    .logo i {
        font-size: 20px;
    }

    .logo .brand {
        font-size: 18px;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

::selection {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

/* ========================================================================
 * 页脚 - 与 that-weiyang-home 风格一致：底部固定 46px、毛玻璃
 * ======================================================================== */
footer.polaris-footer {
    text-align: center;
    height: 46px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.25);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer.polaris-footer .power {
    line-height: 46px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

footer.polaris-footer a {
    color: rgba(255, 255, 255, 0.78);
}

footer.polaris-footer a:hover {
    color: #ffffff;
}

/* 把通用 .notification 替换为透明占位，保留旧 JS 调用不报错 */
.notification {
    display: none !important;
}

/* ========================================================================
 * 壁纸切换弹层（极简，与 home 的 set 面板一致）
 * ======================================================================== */
.wallpaper-panel {
    /* 配色 + 模糊 对齐 home qr-modal-content 风格（home 1010-1016 行）
     * 由于本面板无遮罩层、不允许完全透明，背景不透明度降为 0.30 + blur(12px)
     * 让面板与 about-content 视觉调性一致 */
    position: fixed;
    top: 64px;
    right: 16px;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 18px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.wallpaper-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wallpaper-panel h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

.wallpaper-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.25s ease;
}

.wallpaper-option:hover {
    background: rgba(255, 255, 255, 0.14);
}

.wallpaper-option.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.wallpaper-option i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/*弹窗样式 —— 完全照抄 that-weiyang-home/css/style.css（938–972 行）*/
.iziToast {
    backdrop-filter: blur(10px) !important;
}

.iziToast>.iziToast-body .iziToast-title {
    font-size: 16px !important;
}

.iziToast-body .iziToast-message {
    line-height: 18px !important;
}

.iziToast>.iziToast-body .iziToast-message {
    margin: 6px 0px 4px 0px !important;
}

.iziToast:after {
    box-shadow: none !important;
}

.iziToast>.iziToast-body .iziToast-texts {
    margin: 6px 6px !important;
    display: flex !important;
    align-items: center;
}

.iziToast-message {
    word-break: break-all !important;
}

.iziToast>.iziToast-close {
    background: url('/static/img/ui_icons/close.svg') no-repeat 50% 50% !important;
    background-size: 8px !important;
}

/* 桌面端胶囊状 —— 直接照搬 home/mobile.css 第 252–256 行
 * 关键：min-width:568px 时 30px 大圆角 */
@media (min-width: 568px) {
    .iziToast {
        border-radius: 30px !important;
    }
}