html {
    zoom: 0.90
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #60a5fa;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #f3f4f6;
    --text-secondary: #fff;
    --border-color: rgba(255, 255, 255, 0.1);
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 20px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo {
    font-size: 32px;
}

.nav-title {
    font-size: 1.5em;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.05em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.nav-dropdown-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 0.85em;
    }

    .nav-title {
        font-size: 1em;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 8px;
    }

    .nav-dropdown-link {
        padding: 6px 10px;
        font-size: 0.85em;
    }
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
    gap: 18px;
    animation: fadeInDown 0.6s ease;
}

.mode-tabs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 620px);
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.mode-tab {
    flex: 1;
    min-width: 260px;
    border: none;
    border-radius: 12px;
    padding: 12px 44px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.mode-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
}

.mode-summary {
    max-width: 720px;
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 16px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-summary-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.mode-summary-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.mode-purchase-link {
    color: #bfdbfe;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.mode-purchase-link:hover {
    color: #93c5fd;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 40px;
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-content {
    text-align: left;
}



.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.logo-content h1 {
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.logo-content p {
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 400;
}

.alert-banner {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-left: 5px solid var(--warning-color);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    animation: fadeIn 0.6s ease 0.2s backwards;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content h3 {
    color: var(--warning-color);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
}

.alert-content p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.6;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(360px, 0.75fr);
    gap: 24px;
    margin-bottom: 30px;
    align-items: stretch;
}

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

.panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease 0.3s backwards;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.panel-header-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-zone {
    margin-bottom: 25px;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.42);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    border: 2px solid rgba(59, 130, 246, 0.4);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.62);
}

.btn-select-video {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 18px 48px;
    font-size: 1.3em;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.btn-select-video:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-success {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.file-status {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.mode-tip-card,
.professional-settings {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-tip-title {
    color: var(--text-primary);
    font-size: 0.95em;
    font-weight: 700;
    margin-bottom: 8px;
}

.mode-tip-text {
    color: var(--text-secondary);
    font-size: 0.88em;
    line-height: 1.7;
}

.professional-code-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5f5;
    font-size: 0.85em;
    line-height: 1.6;
}

.professional-code-status[data-state="active"] {
    color: #bfdbfe;
    border-color: rgba(59, 130, 246, 0.25);
}

.professional-code-status[data-state="warning"] {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.25);
}

.professional-code-status[data-state="error"] {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.25);
}

.professional-mode-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.professional-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.9em;
}

.professional-mode-option input {
    accent-color: var(--primary-dark);
}

.panel-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(30, 64, 175, 0.95) 100%);
    border: 2px solid rgba(187, 247, 208, 0.75);
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 900;
    letter-spacing: 0.06em;
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.28);
    white-space: nowrap;
}

.panel-mode-badge.is-professional {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.98) 0%, rgba(37, 99, 235, 0.98) 100%);
    border-color: rgba(187, 247, 208, 0.82);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.32);
}

.panel-area-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(110, 231, 183, 0.42);
    color: #bfdbfe;
    font-size: 0.95em;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.panel-area-mode-badge.is-fullscreen {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(251, 191, 36, 0.48);
    color: #fde68a;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.selection-overlay.overlay-disabled {
    display: none;
}

.progress-tracker {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.progress-label {
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-status {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.download-action {
    display: none;
    margin-top: 15px;
}

.controls-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: rgba(17, 24, 39, 0.88);
}

.control-section {
    margin-top: 0;
    margin-bottom: 18px;
}

.controls-panel .professional-settings,
.controls-panel .mode-tip-card,
.controls-panel .progress-tracker {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
}

.controls-panel .professional-mode-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.controls-panel .professional-mode-option {
    min-height: 68px;
    align-items: center;
    padding: 16px 18px;
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.7);
    font-size: 1em;
}

.controls-panel .professional-mode-option:has(input:checked) {
    border-color: rgba(147, 197, 253, 0.95);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.5);
}

.control-actions {
    margin-top: auto;
    padding-top: 18px;
}

.control-actions .btn-primary {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.28);
}

.control-actions .btn-primary:disabled {
    color: rgba(255, 255, 255, 0.72);
}

.control-tip {
    margin-top: 12px;
    color: #cbd5e1;
    font-size: 0.86em;
    line-height: 1.6;
    text-align: center;
}

.controls-panel .panel-mode-badge {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.78em;
    letter-spacing: 0;
}

.controls-panel .panel-area-mode-badge {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 0.78em;
}

.try-professional-action {
    display: block;
    margin-top: 12px;
    padding: 0;
    border: none;
    background: transparent;
    color: #bfdbfe;
    cursor: pointer;
    font-size: 0.92em;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.try-professional-action:hover {
    color: #93c5fd;
}

.professional-history-panel {
    margin-bottom: 34px;
    padding: 24px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
    animation: fadeInUp 0.45s ease backwards;
}

.professional-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.professional-history-subtitle {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.92em;
    line-height: 1.6;
}

.professional-history-list {
    display: grid;
    gap: 12px;
}

.professional-history-empty {
    padding: 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(148, 163, 184, 0.28);
}

.professional-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.professional-history-cover {
    flex: 0 0 112px;
    width: 112px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.professional-history-cover img,
.professional-history-cover video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.professional-history-content {
    flex: 1 1 auto;
    min-width: 0;
}

.professional-history-name {
    color: var(--text-primary);
    font-weight: 800;
    word-break: break-word;
}

.professional-history-meta {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.84em;
    line-height: 1.5;
}

.professional-history-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.professional-history-preview,
.professional-history-download {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.9em;
    font-weight: 800;
    text-decoration: none;
}

.professional-history-preview {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
}

.professional-history-download {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.professional-history-preview:hover,
.professional-history-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.hidden {
    display: none !important;
}

.advanced-panel {
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.advanced-summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 0.98em;
    font-weight: 600;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advanced-summary::-webkit-details-marker {
    display: none;
}

.advanced-summary::after {
    content: '▾';
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.advanced-panel[open] .advanced-summary::after {
    transform: rotate(180deg);
}

.advanced-content {
    padding: 0 20px 18px;
}

.mode-field {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mode-label {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
}

.mode-select {
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-primary);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mode-select:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.mode-description,
.mode-edge-hint {
    font-size: 0.86em;
    line-height: 1.6;
}

.mode-description {
    color: var(--text-secondary);
}

.mode-edge-hint {
    margin-top: 8px;
    color: #bfdbfe;
    display: none;
}

.mode-edge-hint.is-visible {
    display: block;
}

.info-list {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.info-list li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    flex-shrink: 0;
}

.video-preview {
    position: relative;
    width: 100%;
    min-height: 560px;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #0b0d12;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

#previewVideo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.video-preview.has-empty-state:not(.has-video) #previewVideo {
    opacity: 0;
    pointer-events: none;
}

.video-preview.has-video .video-drop-zone {
    display: none;
}

.video-drop-zone {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px;
    text-align: center;
    color: var(--text-primary);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.86)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 16px);
    border: 2px dashed rgba(148, 163, 184, 0.38);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.video-drop-zone.is-dragging {
    border-color: #93c5fd;
    background:
        linear-gradient(180deg, rgba(20, 83, 45, 0.72), rgba(15, 23, 42, 0.86)),
        repeating-linear-gradient(135deg, rgba(134, 239, 172, 0.12) 0 1px, transparent 1px 16px);
}

.video-drop-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, #bef264 0%, #6ee7b7 100%);
    font-size: 42px;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 18px 42px rgba(59, 130, 246, 0.28);
}

.drop-zone-title {
    margin: 6px 0 0;
    font-size: 1.6em;
    font-weight: 800;
}

.video-drop-zone p {
    color: #cbd5e1;
    font-size: 0.95em;
    line-height: 1.6;
}

.video-panel {
    padding: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
}

.video-panel .video-preview {
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(17, 24, 39, 0.92);
}

.video-footer .file-status {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e5e7eb;
    word-break: break-word;
}

.video-footer .btn-secondary {
    flex: 0 0 auto;
}

.video-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.selection-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.selection-box {
    position: absolute;
    border: 3px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.2);
    pointer-events: auto;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.resize-handle {
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resize-handle:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.handle-nw {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.handle-ne {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.handle-sw {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.handle-se {
    bottom: -8px;
    right: -8px;
    cursor: nwse-resize;
}

.coordinate-display {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0;
    color: var(--text-primary);
    font-size: 0.9em;
    margin-bottom: 0;
    font-family: 'Courier New', monospace;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hint-text {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 6px 0 0;
}

.app-footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9em;
    animation: fadeIn 0.6s ease 0.5s backwards;
}

.app-footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.app-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .logo-wrapper {
        padding: 15px 25px;
        gap: 15px;
    }

    .mode-tabs {
        display: flex;
        width: 100%;
        max-width: 840px;
        gap: 8px;
    }

    .mode-tab {
        flex: 1;
        min-width: 0;
        padding: 11px 12px;
    }

    .mode-summary {
        padding: 14px 16px;
    }

    .logo-content {
        text-align: center;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .logo-content h1 {
        font-size: 1.6em;
    }

    .panel {
        padding: 20px;
    }

    .video-panel {
        padding: 0;
    }

    .video-preview {
        min-height: 340px;
    }

    .video-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .control-head {
        flex-direction: column;
    }

    .panel-header-badges {
        width: 100%;
    }

    .professional-history-panel {
        padding: 18px;
    }

    .professional-history-item {
        align-items: stretch;
        flex-direction: column;
    }

    .professional-history-cover {
        flex-basis: auto;
        width: 100%;
    }

    .professional-history-actions {
        width: 100%;
    }

    .professional-history-preview,
    .professional-history-download {
        flex: 1 1 0;
        text-align: center;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .mode-field {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .advanced-summary {
        padding: 14px 16px;
    }

    .advanced-content {
        padding: 0 16px 16px;
    }

    .mode-select {
        width: 100%;
    }

    .professional-mode-group {
        flex-direction: column;
        gap: 10px;
    }

    .professional-mode-option {
        width: 100%;
    }
}

.footer {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 20px 40px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-copyright {
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.footer-platforms {
    color: var(--text-secondary);
    font-size: 0.85em;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 15px 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-title {
        font-size: 1em;
        margin-bottom: 15px;
    }

    .footer-links a {
        font-size: 0.85em;
    }

    .footer-copyright {
        font-size: 0.9em;
    }

    .footer-platforms {
        font-size: 0.8em;
    }
}

.steps-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 60px 20px;
    margin-top: 40px;
}

.steps-container {
    max-width: 1200px;
    margin: 0 auto;
}

.steps-title {
    font-size: 2em;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 12px;
}

.steps-subtitle {
    max-width: 720px;
    margin: 0 auto 28px;
    color: var(--text-secondary);
    font-size: 0.98em;
    line-height: 1.7;
    text-align: center;
}

.mode-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 42px;
}

.mode-guide-card {
    padding: 28px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.mode-guide-card:first-child {
    border-color: rgba(110, 231, 183, 0.38);
}

.mode-guide-card:last-child {
    border-color: rgba(110, 231, 183, 0.38);
}

.mode-guide-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    color: #102014;
    background: linear-gradient(135deg, #bef264 0%, #6ee7b7 100%);
    font-size: 0.9em;
    font-weight: 900;
}

.mode-guide-card:last-child .mode-guide-tag {
    color: #102014;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.mode-guide-card h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.25em;
    line-height: 1.4;
}

.mode-guide-card p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.75;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.step-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.step-description {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .steps-section {
        padding: 40px 15px;
    }

    .steps-title {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .steps-subtitle {
        margin-bottom: 24px;
    }

    .mode-guide-grid {
        gap: 16px;
        margin-bottom: 34px;
    }

    .mode-guide-card {
        padding: 22px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-card {
        padding: 25px 20px;
    }

    .step-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .step-title {
        font-size: 1em;
        margin-bottom: 12px;
    }

    .step-description {
        font-size: 0.85em;
    }
}

.faq-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 60px 20px;
    margin-top: 40px;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-title {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.faq-question {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.4;
}

.faq-answer {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.8;
}

.right-bar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 12px 10px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.right-bar:hover {
    box-shadow: 0 6px 28px rgba(59, 130, 246, 0.35), 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.bookmark-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.bookmark-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.bookmark-btn:active {
    transform: scale(0.92);
}

@keyframes bookmark-pop {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.25);
    }

    50% {
        transform: scale(0.9);
    }

    70% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.bookmark-btn.animate {
    animation: bookmark-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bookmark-icon {
    width: 24px;
    height: 24px;
    color: #1d4ed8;
    transition: all 0.3s ease;
}

.qrcode-text {
    color: #1d4ed8;
    font-size: 13px;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.bookmark-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
}

.bookmark-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .faq-section {
        padding: 40px 15px;
    }

    .faq-title {
        font-size: 1.4em;
        margin-bottom: 30px;
    }

    .faq-item {
        padding: 20px;
    }

    .faq-question {
        font-size: 1em;
    }

    .faq-answer {
        font-size: 0.9em;
    }

    .right-bar {
        right: 15px;
        top: auto;
        bottom: 20px;
        transform: none;
        padding: 12px;
    }

    .bookmark-btn {
        width: 42px;
        height: 42px;
    }

    .bookmark-icon {
        width: 20px;
        height: 20px;
    }

    .qrcode-text {
        font-size: 12px;
        margin-top: 6px;
    }
}

/* Selling Points Section */
.selling-points {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px;
    text-align: center;
}

.selling-points h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    margin: 0 0 16px;
    line-height: 1.5;
}

.selling-points-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.selling-point-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 12px;
    background: var(--card-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    text-align: left;
}

.selling-point-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.selling-point-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 4px;
}

.selling-point-item p {
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .selling-points-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .selling-points h2 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .selling-points-grid {
        grid-template-columns: 1fr;
    }
}
