body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* 固定顶部选项卡 */
.tabs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%; /* 调整为百分比布局 */
    max-width: 500px; /* 最大宽度 */
    margin-top: 80px; /* 留出顶部选项卡的空间 */
    text-align: center;
}

/* 隐藏“视频与图片生成器”标题 */
.hidden {
    display: none;
}

h1 {
    font-size: 20px; /* 标题文字大小 */
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 5px;
}

.tab-button.active {
    background-color: #0056b3;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* 防止输入框溢出 */
    font-size: 16px; /* 调整字体大小 */
    margin-top: 10px; /* 上移输入框 */
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.upload-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.upload-label:hover {
    background-color: #0056b3;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px; /* 调整字体大小 */
}

button:hover {
    background-color: #0056b3;
}

.output-section {
    margin-top: 20px;
}

video {
    width: 100%;
    margin-top: 10px;
}

#image-preview img.thumbnail {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#image-output {
    margin-top: 20px;
}

#generated-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#task-id, #status {
    font-size: 14px; /* 任务 ID 和状态文字大小 */
    margin: 5px 0;
}

/* 比例选择器 */
.ratio-selector {
    margin-bottom: 20px;
}

.ratio-title {
    font-size: 16px;
    color: #fff; /* 白色文字 */
    margin-bottom: 10px;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4列布局 */
    gap: 10px;
}

.ratio-card {
    background-color: #333; /* 灰色卡片 */
    color: #fff; /* 白色文字 */
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ratio-card:hover {
    background-color: #555; /* 悬停时变亮 */
}

.ratio-card.active {
    background-color: #007bff; /* 选中时蓝色 */
}