/* ==========================================================================
   CSS 視覺外觀樣式系統 - AI 短影音自動剪輯控制台
   設計風格：頂級深色霓虹 (Neon Dark Mode) & 磨砂玻璃 (Glassmorphism)
   ========================================================================== */

/* 基礎變數與色彩系統 */
:root {
    --bg-primary: #050816; /* 深邃專業的藍色調暗夜底色 */
    --bg-secondary: rgba(10, 20, 50, 0.7);
    --glass-bg: rgba(12, 28, 64, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(0, 235, 214, 0.15);
    
    /* 鉅微企業品牌色彩系統 - 主色：專業深海藍，輔色：極光青，點綴色：暖金黃 */
    --primary-color: #0b4da2;    /* 鉅微深海藍 */
    --accent-color: #00ebd6;     /* 極光青 */
    --accent-glow: rgba(0, 235, 214, 0.35);
    --neon-cyan: #00ebd6;
    --neon-magenta: #7f00ff;     /* 尊爵深紫 */
    --neon-purple: #3a2be2;
    --neon-yellow: #ffd000;      /* 醒目暖金黃 */
    --neon-green: #10b981;
    
    /* 頂級專業漸層色組 */
    --gradient-primary: linear-gradient(135deg, #00ebd6 0%, #0b4da2 100%);
    --gradient-magenta: linear-gradient(135deg, #7f00ff 0%, #00ebd6 100%);
    --gradient-success: linear-gradient(135deg, #00ebd6 0%, #10b981 100%);
    --gradient-card: linear-gradient(145deg, rgba(12, 28, 64, 0.65) 0%, rgba(4, 9, 24, 0.88) 100%);
    
    /* 文字色彩 */
    --text-main: #f0f3ff;        /* 舒適的冷白，更好閱讀 */
    --text-muted: #8fa0c5;       /* 柔和的藍灰 */
    --text-dark: #030614;
}

/* 全域重設與基本排版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 霓虹流動背景動畫 */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #121026 0%, #05040a 100%);
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float-slow 15s infinite alternate ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: var(--neon-purple);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 600px;
    height: 600px;
    background: var(--neon-cyan);
    bottom: -200px;
    right: -100px;
    animation-delay: 3s;
}

.circle-3 {
    width: 400px;
    height: 400px;
    background: var(--neon-magenta);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 6s;
    opacity: 0.15;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, -50px) scale(0.9); }
}

/* 主容器排版 */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* 網頁標頭 */
.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.header-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
}

#header-logo-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3), 0 0 40px rgba(255, 0, 127, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

#header-logo-img:hover {
    transform: scale(1.08) rotate(5deg);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.5), 0 0 50px rgba(0, 242, 254, 0.2);
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    animation: pulse-glow 2s infinite alternate;
}

.app-header h1 {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.4));
}

.app-header .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

/* 主操作區域雙欄排版 */
.main-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 磨砂玻璃卡片通用樣式 */
.glass-card {
    background: var(--gradient-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(138, 43, 226, 0.05);
}

/* 標題欄樣式 */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.badge {
    background: rgba(0, 242, 254, 0.15);
    color: var(--neon-cyan);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 242, 254, 0.3);
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
}

/* 影片預覽渲染畫布容器（核心） */
.canvas-container {
    position: relative;
    margin: 0 auto 1.5rem auto;
    background-color: #030207;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 100%; /* 防止手機版超出畫面 */
}

/* 比例控制尺寸 - 預設電腦版尺寸 */
.ratio-9-16 {
    width: 320px;
    height: 568px; /* 標準手機直式比例 */
}

.ratio-1-1 {
    width: 420px;
    height: 420px; /* 正方形 */
}

.ratio-16-9 {
    width: 540px;
    height: 304px; /* 寬螢幕 */
}

/* 手機版自適應比例調和 */
@media (max-width: 600px) {
    .ratio-9-16 {
        width: 270px;
        height: 480px;
    }
    .ratio-1-1 {
        width: 290px;
        height: 290px;
    }
    .ratio-16-9 {
        width: 100%;
        aspect-ratio: 16/9;
        height: auto;
    }
}

/* 讓 Canvas 完全貼合容器 */
#main-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 浮動動態字幕（畫面上方覆蓋，也可直接在畫布渲染，這裡做精美效果） */
#subtitle-overlay {
    position: absolute;
    bottom: 40px;
    left: 5%;
    width: 90%;
    text-align: center;
    pointer-events: none;
    font-size: 1.4rem;
    font-weight: 800;
    z-index: 10;
    transition: all 0.2s ease;
    text-shadow: 2px 2px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000;
}

/* 字幕風格組 */
.subtitle-style-yellow {
    color: var(--neon-yellow);
    transform: scale(1);
}

.subtitle-style-neon {
    color: #fff;
    text-shadow: 0 0 10px var(--neon-magenta), 0 0 20px var(--neon-purple);
    font-style: italic;
}

.subtitle-style-card {
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    width: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* 影音加載與狀態遮罩 */
.loader-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 9, 21, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 242, 254, 0.1);
    border-top-color: var(--neon-cyan);
    border-bottom-color: var(--neon-magenta);
    border-radius: 50%;
    animation: spin 1.2s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 播放器底端控制條 */
.player-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.8rem;
}

.time-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* 滑動條自訂樣式 */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* 右側控制面板群組 */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.panel-section {
    padding: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.step-num {
    background: var(--gradient-magenta);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
}

.section-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

/* 匯入控制區 */
.import-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.styled-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.styled-select:focus {
    border-color: var(--neon-cyan);
}

.file-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-dropzone:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 254, 0.03);
}

.file-dropzone svg {
    width: 40px;
    height: 40px;
    fill: var(--text-muted);
    transition: fill 0.3s ease;
}

.file-dropzone:hover svg {
    fill: var(--neon-cyan);
}

/* 子區域樣式 */
.sub-section {
    margin-bottom: 1.2rem;
}

.sub-section h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

/* 比例標籤分頁按鈕 */
.ratio-buttons {
    display: flex;
    gap: 0.8rem;
}

.btn-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.8rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-tab.active {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

/* 比例小圖示 */
.ratio-icon {
    border: 2px solid currentColor;
    border-radius: 3px;
    display: inline-block;
}

.rect-vertical { width: 10px; height: 16px; }
.rect-square { width: 14px; height: 14px; }
.rect-horizontal { width: 16px; height: 10px; }

/* 濾鏡卡片網格 */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.btn-filter {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    outline: none;
    transition: all 0.3s ease;
}

.filter-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    transition: all 0.3s ease;
}

.filter-p-none { background: linear-gradient(45deg, #3a3b4c, #1f2029); }
.filter-p-cyber { background: linear-gradient(45deg, #ff007f, #00f2fe); text-shadow: 0 0 3px #000; }
.filter-p-warm { background: linear-gradient(45deg, #f857a6, #ff5858); }
.filter-p-bw { background: linear-gradient(45deg, #8e9eab, #2b32b2); filter: grayscale(1); }

.btn-filter:hover .filter-preview {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-filter.active .filter-preview {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transform: scale(1.08);
}

.btn-filter.active span {
    color: var(--neon-cyan);
    font-weight: 500;
}

.btn-filter span {
    font-size: 0.78rem;
    transition: color 0.3s ease;
}

/* 字幕風格選擇器與控制 */
.subtitle-style-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.subtitle-style-selector label {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.style-options {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.btn-tab-small {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.4rem 0.3rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-tab-small.active {
    background: rgba(255, 0, 127, 0.12);
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
}

.caption-generator {
    margin-bottom: 1rem;
}

/* 字幕時間軸編輯列表 */
.subtitle-timeline-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

.subtitle-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.subtitle-list {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.3rem;
}

/* 捲軸美化 */
.subtitle-list::-webkit-scrollbar {
    width: 4px;
}
.subtitle-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.subtitle-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.subtitle-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.sub-input-time {
    width: 45px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--neon-cyan);
    padding: 0.2rem;
    border-radius: 4px;
    text-align: center;
    font-family: monospace;
    font-size: 0.8rem;
    outline: none;
}

.sub-input-text {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-main);
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.sub-input-text:focus {
    border-bottom-color: var(--neon-cyan);
    background: rgba(255, 255, 255, 0.02);
}

/* 音量調整區 */
.volume-controls {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.volume-slider-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
}

.volume-slider-item span:first-child {
    width: 100px;
    color: var(--text-muted);
}

.vol-num {
    width: 40px;
    text-align: right;
    font-family: monospace;
    color: var(--neon-cyan);
}

/* 主要操作按鈕組 */
.action-buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 1rem;
}

/* 按鈕基類 */
button {
    font-family: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-icon {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--text-main);
}

.btn-primary {
    background: var(--gradient-magenta);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 8px 24px rgba(255, 0, 127, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 0, 127, 0.45);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 8px 24px rgba(57, 255, 20, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(57, 255, 20, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-text {
    background: transparent;
    color: var(--neon-cyan);
    font-size: 0.8rem;
    font-weight: bold;
}

.btn-text:hover {
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* 閃爍動畫 */
.btn-icon-flash {
    animation: flash 1.5s infinite alternate;
}

@keyframes flash {
    0% { filter: drop-shadow(0 0 2px #fff); }
    100% { filter: drop-shadow(0 0 8px var(--neon-cyan)); }
}

/* 輸出模態視窗覆蓋層 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 3, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.modal-content h3 {
    font-size: 1.4rem;
    color: var(--text-main);
}

/* 進度條樣式 */
.progress-ring-wrapper {
    margin: 1rem 0;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-green));
    background-size: 200% 100%;
    border-radius: 10px;
    box-shadow: 0 0 15px var(--neon-cyan);
    animation: gradient-flow 2s linear infinite;
    transition: width 0.1s ease;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.progress-percent {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--neon-cyan);
    margin-top: 0.8rem;
    font-family: monospace;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.export-tip {
    font-size: 0.82rem;
    color: var(--neon-magenta);
}

/* 隱藏輔助樣式 */
.hidden {
    display: none !important;
}

@keyframes pulse-glow {
    0% { filter: drop-shadow(0 0 5px var(--neon-cyan)); }
    100% { filter: drop-shadow(0 0 15px var(--neon-cyan)) drop-shadow(0 0 30px var(--neon-magenta)); }
}

/* ==========================================================================
   鉅微管理顧問 EAP 品牌專區樣式
   ========================================================================== */
.gmmc-brand-section {
    margin-top: 3rem;
    padding: 2.2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(14, 25, 60, 0.6) 0%, rgba(8, 12, 35, 0.8) 100%);
    border: 1px solid rgba(0, 242, 254, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.05);
}

.gmmc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.gmmc-title-area h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

.gmmc-badge {
    background: rgba(255, 0, 127, 0.15);
    color: var(--neon-magenta);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 0, 127, 0.3);
    text-shadow: 0 0 5px rgba(255, 0, 127, 0.5);
    display: inline-block;
}

.gmmc-english {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 0.2rem;
}

.btn-gmmc-apply {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-cyan) 100%);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-gmmc-apply:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.gmmc-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 1.8rem;
}

@media (max-width: 900px) {
    .gmmc-content {
        grid-template-columns: 1fr;
    }
}

.gmmc-intro-card h4 {
    font-size: 1.15rem;
    color: var(--neon-cyan);
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.gmmc-intro-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    text-align: justify;
}

.gmmc-intro-card strong {
    color: var(--neon-yellow);
    font-weight: 700;
}

.gmmc-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .gmmc-services-grid {
        grid-template-columns: 1fr;
    }
}

.gmmc-service-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    transition: all 0.3s ease;
}

.gmmc-service-item:hover {
    background: rgba(0, 242, 254, 0.03);
    border-color: rgba(0, 242, 254, 0.15);
    transform: translateY(-3px);
}

.service-icon {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    display: inline-block;
}

.gmmc-service-item h5 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.gmmc-service-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.gmmc-footer-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.2rem;
}

.gmmc-footer-info a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gmmc-footer-info a:hover {
    text-shadow: 0 0 5px var(--neon-cyan);
    text-decoration: underline;
}

/* ==========================================================================
   全新 RWD 行動裝置響應式優化與細節微調 (手機/平板/電腦完美適應)
   ========================================================================== */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr; /* 切換為單欄，避免左右推擠 */
        gap: 1.5rem;
    }

    .preview-panel {
        position: sticky;
        top: 10px;
        z-index: 50; /* 讓影片預覽在滾動時黏貼在最上方，提升操作方便度 */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 1.2rem 0.8rem;
    }

    .app-header h1 {
        font-size: 2.1rem;
        letter-spacing: 1px;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .app-header .subtitle {
        font-size: 0.95rem;
    }

    /* 控制面板的圓角與內間距細微收縮，最大化螢幕利用率 */
    .glass-card {
        padding: 1.2rem;
        border-radius: 16px;
    }

    /* 調整按鈕大小與觸控範圍，更方便手指點擊 */
    .action-buttons-group {
        grid-template-columns: 1fr; /* 按鈕直列排版 */
        gap: 0.8rem;
    }

    .btn-primary, .btn-success {
        padding: 0.9rem 1.2rem;
        font-size: 0.98rem;
        border-radius: 10px;
    }

    .player-controls {
        padding: 0.6rem 0.8rem;
        gap: 0.8rem;
    }

    .timeline-slider-wrapper {
        gap: 0.5rem;
    }

    /* 調整比例按鈕，避免字體溢出 */
    .ratio-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* 讓底部的鉅微品牌專區 footer 資訊在手機上置中並分行 */
    .gmmc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .btn-gmmc-apply {
        width: 100%;
        justify-content: center;
    }

    .gmmc-footer-info {
        flex-direction: column;
        gap: 0.6rem;
        text-align: left;
    }
}

/* 微型過渡動畫與按鈕平滑按壓反饋 */
.btn-primary:active, .btn-success:active, .btn-secondary:active, .btn-tab:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 美化輸入下拉選單與上傳框的觸控焦點樣式 */
.styled-select, .file-dropzone, .sub-input-time, .sub-input-text {
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.styled-select:focus, .sub-input-time:focus, .sub-input-text:focus {
    box-shadow: 0 0 10px rgba(0, 235, 214, 0.2);
}
