* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: none;
}
body {
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    background: linear-gradient(135deg, 
        #0a0e27 0%, 
        #1a1f3a 25%, 
        #2d3748 50%, 
        #4a5568 75%, 
        #718096 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: aig-gradient-shift 15s ease infinite;
    color: #ffffff;
    position: relative;
}

@keyframes aig-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.hidden {
    display: none !important;
}
#ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}
/* 只有特定的UI元素可以接收鼠标事件 */
#ui .toolbar,
#ui .toolbar *,
#ui .control-panel,
#ui .control-panel *,
#ui .coordinate-panel,
#ui .coordinate-panel *,
#ui .help-panel,
#ui .help-panel *,
#ui .loading-container,
#ui .loading-container *,
.drop-zone,
.drop-zone *,
.drop-zone-content,
.drop-zone-content * {
    pointer-events: auto;
}
#infoPanel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}
#infoPanel > #infoPanelContent {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translate(-50%, 0);
    min-height: 280px;
    min-width: 320px;
    padding: 8px;
    border-radius: 24px;
    color: black;
    background-color: #eeed;
    display: flex;
    flex-direction: column;
}
#infoPanel > #infoPanelContent > #header {
    font-size: 24px;
    font-weight: bold;
    padding-bottom: 16px;
    color: #444;
    display: none;
}
#infoPanel > #infoPanelContent > #tabs {
    display: flex;
    gap: 16px;
    background-color: #666;
    padding: 8px;
    border-radius: 22px;
}
#infoPanel > #infoPanelContent > #tabs > .tab {
    padding: 8px;
    border-radius: 16px;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #222;
    transition: background-color 250ms ease;
}
#infoPanel > #infoPanelContent > #tabs > .tab:hover {
    background-color: #eee;
}
#infoPanel > #infoPanelContent > #tabs > .tab.active {
    background-color: #eee;
}
#infoPanel > #infoPanelContent > #infoPanels {
    padding: 16px;
}
#infoPanel > #infoPanelContent .control-item {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    line-height: 1.5;
}
#infoPanel > #infoPanelContent > #infoPanels h1 {
    font-size: 14px;
    font-weight: bold;
    padding: 0 0 6px 0;
}
#infoPanel > #infoPanelContent .control-item > .control-action {
    text-align: left;
    color: #333;
}
#infoPanel > #infoPanelContent .control-item > .control-key {
    text-align: right;
    color: #666;
}
#infoPanel > #infoPanelContent .control-spacer {
    border-bottom: 1px dashed #666;
    margin: 10px 0;
}

/* loadingWrap */

#loadingWrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    backdrop-filter: blur(8px);
}

.loading-container {
    text-align: center;
    max-width: 300px;
    padding: 40px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 20px;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(148, 163, 184, 0.1);
    border-top: 4px solid #3b82f6;
    border-right: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: aig-spin 1.2s linear infinite;
    margin: 0 auto 24px;
    position: relative;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid rgba(6, 182, 212, 0.5);
    border-top: 2px solid #06b6d4;
    border-radius: 50%;
    animation: aig-spin 0.8s linear infinite reverse;
}

@keyframes aig-spin {
    0% { 
        transform: rotate(0deg);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    33% {
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
    }
    66% {
        box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    }
    100% { 
        transform: rotate(360deg);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
}

#loadingText {
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 600;
    color: #e2e8f0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: aig-text-glow 2s ease-in-out infinite alternate;
}

@keyframes aig-text-glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.7));
    }
}

#loadingBar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.1));
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#loadingBar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: aig-loading-shimmer 1.5s ease-in-out infinite;
}

@keyframes aig-loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, 
        #3b82f6 0%, 
        #8b5cf6 50%, 
        #06b6d4 100%);
    background-size: 200% 100%;
    animation: aig-progress-glow 2s ease-in-out infinite;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease;
}

@keyframes aig-progress-glow {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.8);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
    }
}

/* controlsWrap */

#controlsWrap {
    position: absolute;
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));

    display: flex;
    flex-direction: column;
}

#controlsWrap.faded-in {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}
#controlsWrap.faded-out {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.5s, opacity 0.5s ease-out;
}

#controlsWrap > #timelineContainer {
    height: 30px;
    cursor: pointer;
}
#controlsWrap > #timelineContainer > #line {
    width: 100%;
    height: 50%;
    border-bottom: 1px solid #8888;
}
#controlsWrap > #timelineContainer > #handle {
    position: absolute;
    top: 15.5px;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border: 1px solid black;
    border-radius: 50%;
    background-color: #fff8;
}
#controlsWrap > #timelineContainer > #time {
    position: absolute;
    top: 0;
    padding: 2px 4px;
    transform: translate(-50%, -100%);
    font-size: 12px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}
#controlsWrap > #buttonContainer {
    display: flex;
    gap: 8px;
}

/* spacer */

.spacer {
    flex-grow: 1;
}

/* settingsPanel */

#settingsPanel {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
    padding: 10px;
    color: #eee;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;

    font-size: 14px;
}
#settingsPanel > .settingsRow {
    display: flex;
    gap: 4px;
    width: 100%;
    
}
#settingsPanel > .settingsRow > .button {
    padding: 10px 0px;
    flex-grow: 1;
}

/* toggleWrap */

.toggleWrap {
    position: relative;
    background-color: #dddd;
    border: 1px solid #888;
    border-radius: 8px;
    height: 40px;
    width: 120px;
}
.toggleWrap > .toggleHighlight {
    position: absolute;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: #eee;
    border-radius: 8px;
    transition: left 0.1s ease-out;
}
.toggleWrap > .toggleHighlight.right {
    left: 60px;
}
.toggleWrap > button {
    position: absolute;
    width: 60px;
    height: 100%;
    border: 0;
    border-radius: 8px;

    cursor: pointer;
    font-size: 14px;
    letter-spacing: -0.25px;

    color: #222;
    background-color: transparent;

    appearance: none;
}
.toggleWrap > button:hover {
    color: black;
}
.toggleWrap > button.left {
    left: 0;
}
.toggleWrap > button.right {
    right: 0;
}

/* button */
.button {
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    color: #222;
    background-color: #dddd;
    border: 1px solid #888;
    border-radius: 8px;
    cursor: pointer;

    /* font-weight: bold; */
    font-size: 14px;
    letter-spacing: -0.25px;
}
.button:hover {
    background-color: #eee;
}
.button > svg {
    display: block;
    margin: auto;
}
#poster {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 50;
    transition: filter 0.5s ease;
}
button {
    color: #222;
}
button:active {
    outline: none;
}
#joystickBase {
    position: fixed;
    bottom: 100px;
    left: 50px;
    width: 80px;
    height: 80px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

#joystick {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 拖拽区域 */
.drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #0f0f23 0%, 
        #1a1a2e 25%, 
        #16213e 50%, 
        #0f3460 75%, 
        #1e3c72 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* 添加动态背景效果 */
.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: backgroundShift 10s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-10px) translateY(-5px);
    }
    50% {
        transform: translateX(10px) translateY(10px);
    }
    75% {
        transform: translateX(-5px) translateY(15px);
    }
}

.drop-zone.hidden {
    display: none !important;
}

.drop-zone.drag-over {
    background: linear-gradient(135deg, 
        #1e293b 0%, 
        #334155 25%, 
        #475569 50%, 
        #64748b 75%, 
        #94a3b8 100%);
    transform: scale(1.01);
}

.drop-zone.drag-over::before {
    animation-duration: 3s;
}

.drop-zone-content {
    text-align: center;
    max-width: 500px;
    padding: 50px 40px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 24px;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* AIG品牌元素 */
.aig-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: aig-icon-glow 3s ease-in-out infinite alternate;
}

@keyframes aig-icon-glow {
    0% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }
    100% {
        filter: drop-shadow(0 4px 16px rgba(59, 130, 246, 0.6));
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
    opacity: 0.8;
}

.drop-zone-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.3) 0%, 
        rgba(139, 92, 246, 0.3) 50%, 
        rgba(16, 185, 129, 0.3) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.drop-zone-content h2 {
    font-size: 1.875rem;
    margin-bottom: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.drop-zone-content p {
    font-size: 1rem;
    margin-bottom: 32px;
    opacity: 0.8;
    color: #cbd5e1;
    font-weight: 400;
}

.select-file-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    border: none;
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px 0 rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
}

.btn-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.select-file-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.select-file-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #0891b2 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px 0 rgba(59, 130, 246, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.select-file-btn:hover::before {
    left: 100%;
}

.select-file-btn:active {
    transform: translateY(0);
}

/* 坐标系选择器样式改进 */
.coordinate-selector {
    margin-top: 24px;
    text-align: center;
}

.coordinate-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.current-coordinate-display {
    margin-bottom: 12px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-coordinate-display span {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
}

.coordinate-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
}

.coordinate-option {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.coordinate-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.coordinate-option input[type="radio"] {
    margin: 0;
    accent-color: #4299e1;
}

.coordinate-option input[type="radio"]:checked + span {
    color: #ffffff;
    font-weight: 600;
}

.coordinate-help {
    margin-top: 12px;
}

.coordinate-help small {
    color: #a0aec0;
    font-size: 11px;
    font-style: italic;
}

/* 工具栏 */
.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
    opacity: 0.6;
    animation: toolbar-fade-in 0.5s ease-out;
}

.toolbar:hover,
.toolbar.controls-open {
    opacity: 1;
    background: rgba(15, 23, 42, 0.95);
}

/* 全屏时隐藏工具栏 */
.toolbar.fullscreen-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.toolbar-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 24px;
    max-width: 800px;
    margin: 0 auto;
    gap: 24px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.15);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toolbar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.toolbar-btn:hover {
    background: rgba(148, 163, 184, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.toolbar-btn:hover::before {
    opacity: 1;
}

.toolbar-btn.active {
    background: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6);
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.toolbar-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toolbar-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

.toolbar-btn:hover::after {
    width: 60px;
    height: 60px;
}

.file-info {
    padding: 12px 20px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    min-width: 180px;
    max-width: 300px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.file-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.1), transparent);
    transition: left 0.6s ease;
}

.file-info:hover::before {
    left: 100%;
}

.file-info span {
    font-size: 15px;
    color: #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.3s ease;
}

.file-info:hover span {
    color: #ffffff;
}

/* 工具栏控制面板 */
.toolbar-control-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.toolbar-control-panel.open {
    max-height: 200px;
    opacity: 1;
    animation: control-panel-slide-down 0.3s ease-out;
}

.control-panel-content {
    padding: 24px 24px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.control-group:last-child {
    margin-left: auto;
}

.control-group label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.button-group {
    display: flex;
    gap: 2px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.control-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.control-btn:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.control-btn:hover::before {
    opacity: 1;
}

.control-btn.active {
    background: rgba(59, 130, 246, 0.4);
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6), 0 2px 8px rgba(59, 130, 246, 0.3);
}

.control-btn.active::before {
    opacity: 1;
}

.control-btn-full {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.25);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.control-btn-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.control-btn-full:hover {
    background: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.control-btn-full:hover::before {
    opacity: 1;
}

.control-btn-full:last-child {
    margin-left: 12px;
}

/* 旧的控制面板样式已移除，现在集成到工具栏中 */

/* 面板样式 */
.coordinate-panel,
.help-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 20px;
    padding: 0;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    z-index: 400;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.panel-header {
    background: rgba(30, 41, 59, 0.8);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}

.close-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.panel-content {
    padding: 24px;
}

.coordinate-panel .coordinate-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.coordinate-panel .coordinate-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.coordinate-panel .coordinate-option:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-1px);
}

.coordinate-panel .coordinate-option input {
    margin-top: 2px;
    accent-color: #3b82f6;
}

.option-content {
    flex: 1;
}

.option-content strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
}

.option-content p {
    opacity: 0.8;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #cbd5e1;
}

/* 帮助面板 */
.help-section {
    margin-bottom: 28px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h4 {
    margin-bottom: 16px;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
}

.help-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.help-item:last-child {
    border-bottom: none;
}

.help-item span:first-child {
    font-weight: 500;
    color: #e2e8f0;
}

.help-item span:last-child {
    background: rgba(30, 41, 59, 0.8);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toolbar {
        padding: 0 12px;
    }
    
    .toolbar-content {
        display: flex;
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .toolbar-left {
        display: flex;
        justify-content: center;
        gap: 16px;
    }
    
    .toolbar-right {
        display: flex;
        justify-content: center;
        gap: 12px;
    }
    
    .toolbar-center {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 8px;
    }
    
    .toolbar-btn {
        width: 40px;
        height: 40px;
    }
    
    .file-info {
        min-width: 140px;
        padding: 8px 12px;
    }
    
    .file-info span {
        font-size: 13px;
    }
    
    .control-panel-content {
        padding: 16px;
        gap: 20px;
        flex-direction: column;
    }
    
    .control-group:last-child {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .control-btn-full:last-child {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .drop-zone-content {
        padding: 40px 20px;
    }
    
    .drop-zone-content h2 {
        font-size: 1.5rem;
    }
    
    .coordinate-options {
        flex-direction: column;
    }
    
    .coordinate-panel,
    .help-panel {
        width: 95%;
        margin: 20px;
    }
    
    .aig-logo {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo-text {
        text-align: center;
    }
    
    .logo-main {
        font-size: 1.8rem;
    }
    
    .logo-sub {
        font-size: 0.9rem;
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .toolbar-content {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .toolbar-btn {
        width: 36px;
        height: 36px;
    }
    
    .file-info {
        min-width: 120px;
        padding: 6px 10px;
    }
    
    .file-info span {
        font-size: 12px;
    }
    
    .control-panel-content {
        padding: 12px;
        gap: 16px;
    }
    
    .control-btn {
        padding: 8px 14px;
        min-width: 60px;
        font-size: 12px;
    }
    
    .control-btn-full {
        padding: 10px 18px;
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 海报样式 */
#poster {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 50;
    transition: filter 0.5s ease;
}

/* 确保兼容性的隐藏样式 */
.hidden {
    display: none !important;
}

/* 坐标系切换提示样式 */
.coordinate-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    min-width: 250px;
}

.coordinate-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    line-height: 1;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-text strong {
    font-size: 14px;
    font-weight: 600;
}

.notification-text span {
    font-size: 12px;
    opacity: 0.8;
}

/* 坐标系面板样式优化 */
.coordinate-panel .coordinate-option {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.coordinate-panel .coordinate-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.coordinate-panel .coordinate-option input[type="radio"]:checked + .option-content {
    opacity: 1;
}

.coordinate-panel .coordinate-option .option-content {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.coordinate-panel .coordinate-option .option-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.coordinate-panel .coordinate-option .option-content p {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* 调试面板样式 */
.panel-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-btn {
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.confirm-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.confirm-btn:active {
    transform: translateY(0);
}

.confirm-btn:disabled {
    background: #4a5568;
    cursor: not-allowed;
    transform: none;
}

.current-status {
    text-align: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-status small {
    color: #a0aec0;
    font-size: 12px;
    line-height: 1.4;
}

.current-status span {
    color: #e2e8f0;
    font-weight: 500;
}

/* 工具栏动画效果 */
@keyframes toolbar-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 0.6;
        transform: translateY(0);
    }
}

@keyframes control-panel-slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #64748b;
}

.control-btn:disabled:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.control-btn:disabled.active {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
}

/* 自动旋转按钮动画 */
@keyframes auto-rotate-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.toolbar-btn.auto-rotating .auto-rotate-indicator {
    animation: auto-rotate-spin 10s linear infinite;
}

.toolbar-btn.auto-rotating {
    background: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6);
}

.toolbar-btn.auto-rotating::before {
    opacity: 1;
}

/* 自动旋转指示器样式 */
.auto-rotate-indicator {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.toolbar-btn:hover .auto-rotate-indicator {
    opacity: 1;
}

.toolbar-btn.auto-rotating .auto-rotate-indicator {
    opacity: 1;
}