/* ==================== 本地字体加载 ==================== */
@font-face {
    font-family: 'milFont';
    src: url('./Fonts/milfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'milFontBold';
    src: url('./Fonts/milfont_bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ==================== 设计令牌 - Rain Editor 风格 ==================== */
:root {
    --font-primary: 'milFont', 'Segoe UI', 'Poppins', 'Quicksand', system-ui, -apple-system, sans-serif;
    --font-bold: 'milFontBold', 'milFont', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Consolas', 'Fira Code', monospace;
    /* 主色调 */
    --rain-sky: rgb(142, 197, 252);        /* #8ec5fc 天蓝主色 */
    --rain-teal: rgb(41, 168, 185);         /* #29a8b9 青绿色 */
    --rain-sky-dark: rgb(128, 178, 228);    /* #80b2e4 深天蓝 hover */
    --rain-teal-dark: rgb(37, 153, 168);    /* #2599a8 深青绿 hover */

    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-card: linear-gradient(135deg, hsl(210, 25%, 88%), hsl(250, 20%, 90%));
    --bg-hover: hsl(210, 20%, 82%);

    /* 文字色 */
    --text-primary: #2c3e50;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-muted: rgba(0, 0, 0, 0.4);

    /* 边框 */
    --border-color: #353535;
    --border-light: rgba(142, 197, 252, 0.4);

    /* 状态色 */
    --success: #4db6ac;
    --error: #ef5350;
    --warning: #ffb74d;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    /* 圆角 */
    --radius-sm: 0.25em;
    --radius-md: 0.6em;
    --radius-lg: 1rem;
    --radius-xl: 2rem;

    /* 过渡 */
    --transition-fast: 150ms ease-out;
    --transition-normal: 200ms ease-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to right, #f5f5f5, #e8e8e8);
    border-radius: 12px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--rain-sky), var(--rain-teal));
    border-radius: 12px;
    border: 2px solid #f5f5f5;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--rain-sky-dark), var(--rain-teal-dark));
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-corner { background: #f5f5f5; }

/* ==================== 背景层 ==================== */
.static-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('./Background.png') center center / cover no-repeat;
    z-index: 0;
    filter: brightness(1.05) saturate(0.95);
    opacity: 0.92;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(
        135deg,
        rgba(142, 197, 252, 0.06) 0%,
        rgba(255, 255, 255, 0.85) 40%,
        rgba(240, 245, 250, 0.88) 60%,
        rgba(41, 168, 185, 0.04) 100%
    );
    backdrop-filter: blur(30px) saturate(1.2);
}

/* ==================== 雨滴Canvas ==================== */
#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.45;
}

/* ==================== 主容器 ==================== */
.app-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    transition: padding 0.3s ease;
}

.app-container.theater-mode {
    padding: 0;
}

.app-container.theater-mode .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: opacity 0.3s ease, height 0.3s ease, padding 0.3s ease;
    border-radius: 0;
    pointer-events: none;
}

.app-container.theater-mode .navbar.show {
    opacity: 0.97;
    height: auto;
    padding: 0.8rem 1.5rem;
    pointer-events: auto;
}

.app-container.theater-mode .status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: opacity 0.3s ease, height 0.3s ease;
    border-radius: 0;
    pointer-events: none;
}

.app-container.theater-mode .status-bar.show {
    opacity: 0.93;
    height: auto;
    padding: 0.5rem 1rem;
    pointer-events: auto;
}

.app-container.theater-mode .player-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    padding: 0;
    margin: 0;
}

.app-container.theater-mode .game-frame {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    flex: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

.app-container.theater-mode .game-frame iframe {
    width: 100% !important;
    height: 100% !important;
}

/* ==================== 导航栏 ==================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.78),
        rgba(247, 248, 250, 0.82)
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    margin-bottom: 1.2rem;
    border: 1.5px solid rgba(142, 197, 252, 0.35);
    box-shadow: var(--shadow-md), 0 0 16px rgba(142, 197, 252, 0.08);
    flex-wrap: wrap;
    gap: 0.8rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(142, 197, 252, 0.55));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--rain-teal), var(--rain-sky));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.controls {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ==================== 按钮组件 ==================== */
.milbtn {
    border: 1.2px solid var(--border-color);
    background: linear-gradient(135deg, hsl(210, 25%, 88%), hsl(250, 20%, 90%));
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
    user-select: none;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.35em 0.9em;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.milbtn:hover {
    filter: brightness(0.94);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.milbtn:active {
    filter: brightness(0.98);
    transform: translateY(0);
}

.upload-btn {
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    border: 1.2px solid rgba(37, 140, 160, 0.4);
    padding: 0.4em 1em;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(142, 197, 252, 0.35);
}

.upload-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(142, 197, 252, 0.45);
}

#file-input {
    display: none;
}

.file-info {
    background: linear-gradient(135deg, hsl(210, 22%, 86%), hsl(220, 18%, 88%));
    padding: 0.38rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--text-secondary);
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(142, 197, 252, 0.25);
}

/* 比例控制 */
.ratio-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(142, 197, 252, 0.14), rgba(41, 168, 185, 0.1));
    padding: 0.28rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(142, 197, 252, 0.25);
}

.ratio-control label {
    color: var(--rain-teal);
    font-weight: 600;
    font-size: 0.78rem;
}

.ratio-select {
    background: rgba(255, 255, 255, 0.92);
    border: 1.2px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.73rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
    color: var(--text-primary);
}

.ratio-select:focus {
    border-color: var(--rain-sky);
}

.custom-ratio-input {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.custom-ratio-input input {
    width: 48px;
    background: rgba(255, 255, 255, 0.92);
    border: 1.2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.22rem 0.35rem;
    font-size: 0.7rem;
    text-align: center;
    outline: none;
    transition: border-color var(--transition-fast);
}

.custom-ratio-input input:focus {
    border-color: var(--rain-sky);
}

.custom-ratio-input button {
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    border: none;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
}

.custom-ratio-input button:hover {
    filter: brightness(1.05);
    box-shadow: 0 2px 6px rgba(142, 197, 252, 0.35);
}

.action-buttons {
    display: flex;
    gap: 0.65rem;
}

.action-btn {
    background: var(--bg-card);
    border: 1.2px solid var(--border-color);
    padding: 0.4em 1em;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.83rem;
}

.action-btn:hover {
    filter: brightness(0.94);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.action-btn.play {
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    color: white;
    border-color: rgba(37, 140, 160, 0.4);
    box-shadow: 0 3px 10px rgba(142, 197, 252, 0.35);
}

.action-btn.play:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(142, 197, 252, 0.5);
}

.action-btn.reset {
    background: linear-gradient(135deg, hsl(210, 26%, 90%), hsl(260, 18%, 91%));
    color: var(--text-secondary);
}

.action-btn.fullscreen {
    background: linear-gradient(135deg, hsl(210, 24%, 87%), hsl(245, 18%, 89%));
}

.settings-btn {
    background: linear-gradient(135deg, hsl(210, 25%, 88%), hsl(250, 20%, 89%));
    border: 1.2px solid var(--border-color);
    padding: 0.4em 0.9em;
    border-radius: var(--radius-sm);
    color: var(--rain-teal);
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.settings-btn:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
    background: linear-gradient(135deg, hsl(210, 23%, 84%), hsl(250, 17%, 86%));
}

.info-link {
    background: none;
    border: none;
    color: var(--rain-sky);
    cursor: pointer;
    font-size: 0.72rem;
    text-decoration: underline;
    text-decoration-color: rgba(142, 197, 252, 0.4);
    padding: 0.25rem 0.5rem;
    transition: all var(--transition-fast);
}

.info-link:hover {
    color: var(--rain-teal);
    text-decoration-color: rgba(41, 168, 185, 0.6);
}

/* ==================== 播放器区域 ==================== */
.player-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
}

.game-frame {
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 32px rgba(142, 197, 252, 0.1);
    border: 1.5px solid rgba(142, 197, 252, 0.3);
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    backdrop-filter: blur(8px);
}

.game-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== 状态栏 ==================== */
.status-bar {
    margin-top: 0.8rem;
    padding: 0.45rem 1rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.75),
        rgba(247, 248, 250, 0.8)
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(142, 197, 252, 0.2);
    box-shadow: var(--shadow-sm);
}

.status-msg {
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== 弹窗 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: rgba(254, 254, 254, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 3vh;
    padding: 2rem;
    max-width: 480px;
    width: 85%;
    border: 1.5px solid rgba(142, 197, 252, 0.3);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.12), 0 0 80px rgba(142, 197, 252, 0.08);
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--rain-teal), var(--rain-sky));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.modal-content p {
    margin: 0.7rem 0;
    line-height: 1.55;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-content code {
    background: linear-gradient(135deg, hsl(210, 25%, 88%), hsl(250, 20%, 90%));
    padding: 0.2rem 0.5rem;
    border-radius: 0.4em;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(142, 197, 252, 0.25);
    color: var(--rain-teal-dark);
}

.modal-close {
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    width: 100%;
    transition: all var(--transition-normal);
    font-size: 0.88rem;
    box-shadow: 0 2px 8px rgba(142, 197, 252, 0.3);
}

.modal-close:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(142, 197, 252, 0.4);
}

/* ==================== 设置面板 ==================== */
.settings-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.97));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 200;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1.5px solid rgba(142, 197, 252, 0.3);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
}

.settings-panel.open {
    right: 0;
}

.settings-panel-header {
    padding: 1.3rem 1.5rem;
    background: linear-gradient(135deg, rgba(142, 197, 252, 0.15), rgba(41, 168, 185, 0.1));
    border-bottom: 1.5px solid rgba(142, 197, 252, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.settings-panel-header h3 {
    color: var(--rain-teal);
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.settings-close-btn {
    background: rgba(142, 197, 252, 0.25);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--rain-teal);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.settings-close-btn:hover {
    background: rgba(142, 197, 252, 0.4);
}

.settings-content {
    padding: 0.9rem;
}

.settings-section {
    background: linear-gradient(135deg, rgba(142, 197, 252, 0.06), rgba(41, 168, 185, 0.04));
    border-radius: var(--radius-md);
    padding: 0.9rem;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(142, 197, 252, 0.15);
}

.settings-section-title {
    color: var(--rain-teal);
    font-size: 0.82rem;
    font-weight: 650;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(142, 197, 252, 0.08);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    flex: 1;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.setting-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(142, 197, 252, 0.25), rgba(41, 168, 185, 0.2));
    outline: none;
    border: 1px solid rgba(142, 197, 252, 0.15);
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(142, 197, 252, 0.4);
    border: 2px solid white;
}

.setting-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    cursor: pointer;
    border: 2px solid white;
}

.setting-value {
    color: var(--rain-teal);
    font-size: 0.73rem;
    min-width: 42px;
    text-align: right;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-weight: 600;
}

.setting-input {
    background: rgba(255, 255, 255, 0.95);
    border: 1.2px solid var(--border-color);
    border-radius: 0.4em;
    padding: 0.25rem 0.45rem;
    font-size: 0.74rem;
    width: 68px;
    text-align: center;
    outline: none;
    transition: border-color var(--transition-fast);
}

.setting-input:focus {
    border-color: var(--rain-sky);
}

/* 开关 */
.setting-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: linear-gradient(135deg, hsl(210, 20%, 88%), hsl(250, 18%, 90%));
    border: 1.5px solid rgba(53, 53, 53, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.setting-toggle.active {
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    border-color: rgba(37, 140, 160, 0.4);
}

.setting-toggle.active::after {
    transform: translateX(20px);
}

.settings-actions {
    padding: 1rem 1rem 1.2rem;
    display: flex;
    gap: 0.7rem;
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1.5px solid rgba(142, 197, 252, 0.2);
}

.settings-action-btn {
    flex: 1;
    padding: 0.55rem 1rem;
    border: 1.2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.settings-action-btn.apply {
    background: linear-gradient(135deg, var(--rain-sky), var(--rain-teal));
    color: white;
    border-color: rgba(37, 140, 160, 0.4);
}

.settings-action-btn.apply:hover {
    filter: brightness(1.05);
    box-shadow: 0 3px 10px rgba(142, 197, 252, 0.35);
}

.settings-action-btn.reset {
    background: linear-gradient(135deg, hsl(210, 26%, 90%), hsl(260, 18%, 91%));
    color: var(--text-secondary);
}

.settings-action-btn:hover {
    transform: translateY(-1px);
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ==================== 响应式 ==================== */
@media (max-width: 800px) {
    .app-container { padding: 0.8rem 0.8rem; }
    .navbar { flex-direction: column; align-items: stretch; }
    .controls { justify-content: center; flex-wrap: wrap; }
    .file-info { max-width: 170px; }
    .settings-panel { width: 320px; right: -320px; }
}

@media (max-width: 550px) {
    .logo-text { font-size: 1.05rem; }
    .ratio-control { display: none; }
    .custom-ratio-input { display: none; }
}
