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

html {
    font-size: 87.5%;
    scroll-behavior: smooth;
}

@media (max-width: 575.98px) {
    html {
        font-size: 100%;
    }
}

body {
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    min-height: 100vh;
}

header {
    background: white;
    color: #333;
    padding: 1rem 2rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 1024px) {
    header {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.25rem;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1024px) {
    .header-logo {
        width: 100%;
    }
}

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    height: 100%;
    width: 100%;
    position: relative;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
}

.header-center {
    position: relative;
    transform: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    z-index: 1;
    flex: 1;
    width: 100%;
}

@media (max-width: 1024px) {
    .header-center {
        order: -1;
        width: 100%;
    }
}

.qr-codes-container {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex: 0 0 auto;
    z-index: 2;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 1024px) {
    .qr-codes-container {
        width: 100%;
        order: 2;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
    z-index: 2;
}

@media (max-width: 1024px) {
    .header-right {
        width: 100%;
        align-items: flex-end;
        order: 3;
    }
}

.header-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-center h1 {
    margin-bottom: 0.25rem;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: white;
}

.header-center .subtitle {
    font-size: clamp(0.75rem, 2vw, 1.1rem);
    opacity: 0.9;
    color: white;
    margin: 0;
}

/* Release Notes 按钮 */
.release-notes-btn {
    background: transparent;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.release-notes-btn:hover {
    background: #f5f5f5;
    border-color: #333;
}

/* 页眉右上角用户信息 */
.user-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-info-header .points {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.user-info-header .points strong {
    color: #667eea;
    font-size: 1rem;
    font-weight: 700;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: white;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
}

.main-content {
    padding: 3rem 2rem;
    position: relative;
    min-height: auto;
}

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 1rem;
    }
}

/* 内容布局 */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.center-section {
    max-width: 700px;
    margin: 0 auto;
    gap: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

.input-group {
    margin-bottom: 1.5rem;
}

.textarea-wrapper {
    position: relative;
}

.input-group textarea {
    width: 100%;
    padding: 1.25rem;
    padding-bottom: 5rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
    min-height: 10rem;
    line-height: 1.6;
    background: white;
}

@media (max-width: 768px) {
    .input-group textarea {
        min-height: 8rem;
        padding-bottom: 4rem;
        border-radius: 8px;
    }
}

.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.config-group {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.config-group-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .config-group-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
}

.config-item-inline {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.config-row-half {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.config-row-half .config-item-inline {
    flex: 1;
    min-width: 0;
}

.config-row-three {
    display: flex;
    gap: 1rem;
    flex: 1;
    margin-top: 1rem;
}

.config-row-three .config-item-inline {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .config-item-inline {
        min-width: auto;
    }

    .config-row-half {
        gap: 0.75rem;
    }

    .config-row-three {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .config-row-half {
        flex-direction: column;
        gap: 0.5rem;
    }

    .config-row-three {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 比例下拉框较小 */
.aspect-ratio-item {
    flex: 0 0 auto;
    min-width: 7rem;
    max-width: 9rem;
}

@media (max-width: 768px) {
    .aspect-ratio-item {
        flex: 1;
        min-width: auto;
    }
}

.config-item-inline label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
    min-height: 1.25rem;
}

.config-item-inline select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
}

@media (max-width: 480px) {
    .config-item-inline select {
        padding: 0.6rem;
    }
}

.config-item-inline select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.aspect-ratio-hint {
    font-size: 0.85rem;
    color: #999;
    text-align: center;
    margin-bottom: 1rem;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.config-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.config-item input,
.config-item select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background-color: white;
    cursor: pointer;
}

.config-item input:focus,
.config-item select:focus {
    outline: none;
    border-color: #667eea;
}

.config-item select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* 生成按钮组 */
.generate-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.generate-btn {
    flex: 3;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .generate-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .history-btn-inline {
        padding: 0.875rem 0.4rem;
        font-size: 0.8rem;
    }
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.35);
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-block;
}

.result-section {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.image-container {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
}

@media (max-width: 768px) {
    .image-container {
        min-height: 300px;
        padding: 1rem;
    }
}

.image-placeholder {
    color: #999;
    font-size: 1rem;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.image-container .loading {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
    white-space: normal;
    min-height: 3rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 3px solid #e0e7ff;
    border-top-color: #667eea;
    animation: loading-spin 0.8s linear infinite;
}

.loading-text {
    display: inline-block;
}

@keyframes loading-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .image-container .loading {
        font-size: 1rem;
        padding: 1rem;
    }
}

.image-container .error-display {
    color: #c33;
    font-size: 1rem;
    font-weight: 600;
    padding: 1.5rem;
    text-align: center;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    min-height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
    word-wrap: break-word;
    max-width: 100%;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .action-buttons {
        gap: 0.75rem;
    }
}

.download-btn,
.history-btn {
    flex: 0 1 auto;
    min-width: 10rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

@media (max-width: 480px) {

    .download-btn,
    .history-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
}

.download-btn:hover,
.history-btn:hover {
    background: #f5f5f5;
    border-color: #333;
}

.error-section {
    max-width: 700px;
    margin: 2rem auto 0;
    padding: 1.25rem;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.error-message {
    color: #c33;
    font-weight: 500;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .config-group {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 30px 20px;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* 用户信息样式 */
.user-info {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.username {
    font-size: 1rem;
    font-weight: 600;
}

.points {
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.points strong {
    color: #ffd700;
    font-size: 1rem;
}

.redeem-btn,
.logout-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

@media (max-width: 480px) {

    .redeem-btn,
    .logout-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

.redeem-btn:hover,
.logout-btn:hover {
    background: #f5f5f5;
    border-color: #333;
}

.logout-btn {
    background: white;
    color: #dc3545;
}

.logout-btn:hover {
    background: #fff5f5;
    border-color: #dc3545;
}

/* 登录/注册界面 */
.auth-section {
    padding: 2.5rem 1.875rem;
    max-width: 25rem;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .auth-section {
        padding: 1.5rem 1.25rem;
    }
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-btn:hover {
    color: #667eea;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

@media (max-width: 480px) {
    .auth-form input {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (max-width: 480px) {
    .auth-btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.auth-error {
    color: #e74c3c;
    font-size: 0.85rem;
    padding: 0.6rem;
    background: #fee;
    border-radius: 5px;
    display: none;
}

.points-info {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.points-info strong {
    color: #667eea;
    font-size: 0.95rem;
}

.quality-info {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin: 0.75rem 0 1rem 0;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* 图片上传样式 */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-btn {
    padding: 0.75rem 1.25rem;
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .upload-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

.upload-btn:hover {
    background: #f5f5f5;
    border-color: #333;
}

.uploaded-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.625rem;
    max-height: 25rem;
    overflow-y: auto;
}

.uploaded-images-inline {
    position: absolute;
    bottom: 0.625rem;
    left: 0.625rem;
    right: 0.625rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

.uploaded-image-item {
    position: relative;
    width: 3.75rem;
    height: 3.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .uploaded-image-item {
        width: 3rem;
        height: 3rem;
    }
}

.uploaded-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* 确保图片不会阻止按钮点击 */
}

.uploaded-image-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    z-index: 10;
    pointer-events: auto;
}

.uploaded-image-item .remove-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* 兑换码弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 2rem;
    border-radius: 15px;
    max-width: 90vw;
    width: 25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.25rem;
        width: 90vw;
        top: auto;
        transform: none;
        margin: 1rem auto;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-3.125rem);
        opacity: 0;
    }

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

.modal-content h2 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-content p {
    color: #666;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .modal-content input {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

.modal-content input:focus {
    outline: none;
    border-color: #667eea;
}

.redeem-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.redeem-input-group input {
    flex: 1;
    margin-bottom: 0;
}

.redeem-input-group button {
    flex: 0 0 auto;
    min-width: 6rem;
}

@media (max-width: 480px) {
    .redeem-input-group {
        gap: 0.5rem;
    }

    .redeem-input-group button {
        min-width: 5rem;
    }
}

/* 二维码放大弹窗样式 */
.qr-code-modal {
    max-width: 31.25rem;
    text-align: center;
}

@media (max-width: 480px) {
    .qr-code-modal {
        width: 90vw;
    }
}

/* Release Notes 模态框 */
.release-notes-modal {
    max-width: 37.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .release-notes-modal {
        width: 90vw;
        max-height: 85vh;
    }
}

.release-notes-content {
    color: #333;
    line-height: 1.8;
}

.release-notes-content .version {
    margin-bottom: 1.875rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.release-notes-content .version:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.release-notes-content .version-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.release-notes-content .version-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.9rem;
    font-weight: 500;
}

.release-notes-content .version-features {
    list-style: none;
    padding-left: 0;
}

.release-notes-content .version-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    font-size: 0.95rem;
}

.release-notes-content .version-features li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #667eea;
    font-weight: bold;
    font-size: 1rem;
}

.qr-code-large {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
}

.qr-code-large img {
    max-width: 100%;
    max-height: 25rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}


/* 二维码客服区域（页眉） */
.qr-code-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.625rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    min-width: 8.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .qr-code-header {
        min-width: 7.5rem;
    }
}

@media (max-width: 480px) {
    .qr-code-header {
        min-width: auto;
        max-width: 10rem;
    }
}

.qr-code-header .qr-code-text {
    font-size: 0.65rem;
    color: #333;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}

@media (max-width: 480px) {
    .qr-code-header .qr-code-text {
        font-size: 0.6rem;
    }
}

.qr-code-header .qr-code-image {
    width: 5.625rem;
    height: 5.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .qr-code-header .qr-code-image {
        width: 5rem;
        height: 5rem;
    }
}

@media (max-width: 480px) {
    .qr-code-header .qr-code-image {
        width: 4.5rem;
        height: 4.5rem;
    }
}

.qr-code-header .qr-code-image:hover {
    transform: scale(1.05);
}

.qr-code-header .qr-code-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.history-modal {
    max-width: 80rem;
    width: 90vw;
    max-height: 85vh;
    margin: 3% auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 768px) {
    .history-modal {
        max-width: 95vw;
        width: 95vw;
        max-height: 80vh;
        margin: 5% auto;
    }
}

.history-modal h2 {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

.history-hint {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}

#historyContent {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.3rem;
}

#historyContent::-webkit-scrollbar {
    width: 6px;
}

#historyContent::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#historyContent::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#historyContent::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.history-list {
    margin: 1.25rem 0;
}

.history-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.pagination-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

.pagination-btn:hover:not(:disabled) {
    background: #0056b3;
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.history-loading {
    color: #666;
}

/* 多张图片生成标签页样式 */
.tabs-container {
    width: 100%;
}

.tabs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

.tabs-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.tab-item:hover {
    background: #f0f0f0;
}

.tab-item.active {
    background: white;
    border-color: #667eea;
    color: #667eea;
}

.tab-item.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.tab-status {
    font-size: 1.2rem;
}

.tabs-info {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

.tabs-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close-tab-btn {
    background: #ff6b6b !important;
}

.close-tab-btn:hover {
    background: #ff5252 !important;
}

@media (max-width: 768px) {
    .tabs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .tabs-list {
        width: 100%;
    }

    .tabs-info {
        width: 100%;
    }

    .tab-item {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}
