/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
    background: linear-gradient(145deg, #f6f9fc 0%, #edf2f7 100%);
    color: #1a2c3e;
    width: 100%;
    min-height: 100vh;
}

/* 应用容器 */
.app-container {
    width: 100%;
    padding: 1rem;
    height: 100vh;
}

/* 标题区域 */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}
.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72, #2b4c7c);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.hero .sub {
    color: #4a627a;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    border-bottom: 1px solid #cbd5e1;
    display: inline-block;
    padding-bottom: 0.25rem;
}

/* 分割布局 */
.split-layout {
    display: flex;
    gap: 2rem;
    height: 100vh;
}
.input-panel {
    width: 25%;
    min-width: 280px;
    background: #eeeeee;
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.02);
    padding: 1.5rem;
    transition: all 0.2s;
    border: 1px solid rgba(148, 163, 184, 0.2);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}
.output-panel {
    width: 75%;
    background: rgba(255,255,255,0.75);
    border-radius: 2rem;
    backdrop-filter: blur(2px);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.05);
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    overflow-y: auto;
}

/* 表单元素 */
.form-group {
    margin-bottom: 1.5rem;
}
label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #0f2b3d;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
label i {
    font-style: normal;
    font-weight: 500;
    background: #eef2ff;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    color: #4f46e5;
}
textarea {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}
textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: white;
}
button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #1e3c72, #2b4c7c);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(30, 60, 114, 0.3);
}
button:active {
    transform: translateY(0);
}
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #4a627a;
}
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #4a627a;
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 分镜表格 */
.storyboard-container {
    margin-top: 1.5rem;
}
.shot-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    min-width: 100%;
}
.shot-table th {
    background: linear-gradient(135deg, #1e3c72, #2b4c7c);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}
.shot-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}
.shot-table tr:hover {
    background: rgba(236, 240, 241, 0.5);
}

/* 表格列宽 */
.shot-table th:nth-child(1),
.shot-table td:nth-child(1) {
    width: 6%;
    min-width: 60px;
}
.shot-table th:nth-child(2),
.shot-table td:nth-child(2) {
    width: 10%;
    min-width: 120px;
}
.shot-table th:nth-child(3),
.shot-table td:nth-child(3) {
    width: 8%;
    min-width: 100px;
}
.shot-table th:nth-child(4),
.shot-table td:nth-child(4) {
    width: 26%;
}
.shot-table th:nth-child(5),
.shot-table td:nth-child(5) {
    width: 25%;
}
.shot-table th:nth-child(6),
.shot-table td:nth-child(6) {
    width: 25%;
}

/* 提示词单元格 */
.prompt-cell {
    position: relative;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
}
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4a627a;
    transition: all 0.2s;
}
.copy-btn:hover {
    background: #cbd5e1;
    transform: scale(1.05);
}

/* 统计信息 */
.stats {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #4a627a;
}
.shot-count {
    font-weight: 600;
    color: #1e3c72;
}

/* 下载按钮 */
.download-section {
    margin-top: 2rem;
    text-align: right;
}
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}
.download-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
        height: auto;
    }
    .input-panel {
        width: 100%;
        min-height: 400px;
        height: auto;
        position: static;
    }
    .output-panel {
        width: 100%;
    }
    .shot-table {
        font-size: 0.85rem;
    }
    .shot-table th,
    .shot-table td {
        padding: 0.5rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}
.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #1a2c3e;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}