
/* 现有样式... */
body {
    font-family: 'Noto Serif SC', serif;
    background-color: #0a0a1a;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><circle cx="15%" cy="15%" r="1" fill="white"/><circle cx="35%" cy="35%" r="1" fill="white"/><circle cx="55%" cy="55%" r="1" fill="white"/><circle cx="75%" cy="75%" r="1" fill="white"/><circle cx="95%" cy="95%" r="1" fill="white"/><circle cx="10%" cy="50%" r="1" fill="white"/><circle cx="50%" cy="10%" r="1" fill="white"/><circle cx="90%" cy="50%" r="1" fill="white"/><circle cx="50%" cy="90%" r="1" fill="white"/></svg>');
    animation: twinkle 5s infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(10, 10, 30, 0.85);
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    font-size: 2.5rem;
    text-shadow: 0 0 10px #ffd700;
}

.subtitle {
    font-size: 1.1rem;
    color: #c0c0c0;
}

section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
}

/* 设置按钮 */
.settings-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #8b5cf6, #c084fc);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s, background 0.3s;
    z-index: 1000;
}

.settings-fab:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #c084fc, #8b5cf6);
}


/* API配置模态框 */
.api-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a3a;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    border: 1px solid #8b5cf6;
    text-align: center;
}

.modal-content h3 {
    color: #ffd700;
    font-family: 'Cinzel', serif;
}

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

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #c0c0c0;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid #8b5cf6;
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1rem;
}

.save-config-btn {
    background: linear-gradient(45deg, #8b5cf6, #c084fc);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.save-config-btn:hover {
    background: linear-gradient(45deg, #c084fc, #8b5cf6);
}


/* 其他样式... */
.upload-area {
    text-align: center;
    padding: 2rem;
    border: 2px dashed #8b5cf6;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.upload-area:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #ffd700;
}

.upload-icon {
    font-size: 3rem;
}

.upload-btn {
    background: linear-gradient(45deg, #8b5cf6, #c084fc);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: linear-gradient(45deg, #c084fc, #8b5cf6);
}

.preview-area {
    text-align: center;
    position: relative;
}

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    border: 2px solid #8b5cf6;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid #8b5cf6;
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1rem;
    resize: vertical;
}

.spread-options {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.spread-option {
    cursor: pointer;
    padding: 0.8rem 1.2rem;
    border: 1px solid #8b5cf6;
    border-radius: 25px;
    transition: background 0.3s, color 0.3s;
}

.spread-option input {
    display: none;
}

.spread-option input:checked + span {
    color: #ffd700;
}

.spread-option:has(input:checked) {
    background: #8b5cf6;
    color: white;
}

.read-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #ffd700, #ff6b35);
    color: #1a1a3a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.read-btn:disabled {
    background: #555;
    cursor: not-allowed;
    color: #888;
}

.result-section h3 {
    text-align: center;
    color: #ffd700;
}

.save-btn {
    display: block;
    margin: 2rem auto 0;
    background: none;
    border: 1px solid #8b5cf6;
    color: #8b5cf6;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: #888;
}
