:root {
    --bg-color: #0b0f19;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --text-main: #f0f0f0;
    --text-sub: #8892b0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--bg-color); color: var(--text-main);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh; overflow-x: hidden; position: relative;
}

/* 动态背景光效 */
.bg-glow { position: fixed; border-radius: 50%; filter: blur(100px); z-index: -1; opacity: 0.5; }
.blob-1 { width: 300px; height: 300px; background: #2a1b41; top: -10%; left: -10%; }
.blob-2 { width: 400px; height: 400px; background: #1f1c08; bottom: -10%; right: -10%; }

.app-container {
    max-width: 600px; margin: 0 auto; padding: 30px 20px;
    display: flex; flex-direction: column; gap: 25px;
}

header { text-align: center; margin-bottom: 10px; }
header h1 { font-size: 28px; font-weight: 300; letter-spacing: 2px; }
header h1 span { color: var(--gold); font-weight: 600; }
header p { color: var(--text-sub); font-size: 14px; margin-top: 5px; letter-spacing: 4px; }

/* 预览区 */
.preview-section { display: flex; justify-content: center; }
.preview-box {
    width: 200px; height: 200px; border-radius: 20px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.preview-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.preview-overlay {
    position: absolute; bottom: 0; width: 100%; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px); text-align: center; padding: 8px 0; font-size: 12px; color: var(--gold);
}

/* 控制面板 - 磨砂玻璃 */
.control-panel {
    background: var(--glass-bg); backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border); border-radius: 24px;
    padding: 25px; display: flex; flex-direction: column; gap: 20px;
}

.input-group { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.input-group label { font-size: 13px; color: var(--text-sub); margin-left: 5px; }

/* 请在 style.css 中追加或替换输入框相关的样式 */

input, select {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    color: white; padding: 14px 18px; border-radius: 12px;
    font-size: 16px; outline: none; transition: 0.3s;
    appearance: none; /* 移除原生下拉箭头 */
    font-weight: 500;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
option { background: var(--bg-color); color: white; font-weight: normal; }

/* --- 新增：颜色选择器高级包裹层与指示灯 --- */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.color-select {
    padding-left: 45px; /* 给左侧的颜色小球留出空间 */
}
.color-dot {
    position: absolute;
    left: 15px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    pointer-events: none; /* 防止阻挡用户点击下拉框 */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 按钮 */
.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #aa8017 100%);
    color: #fff; border: none; padding: 16px; border-radius: 12px;
    font-size: 16px; font-weight: bold; letter-spacing: 1px;
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 5px 20px var(--gold-glow); transition: 0.3s;
    display: flex; justify-content: center; align-items: center;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { filter: grayscale(1); cursor: not-allowed; }

/* 加载动画 */
.loader {
    width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 居中弹窗 (作品区) */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    z-index: 1000; justify-content: center; align-items: center;
}
.modal-content {
    background: var(--glass-bg); border: 1px solid var(--gold);
    border-radius: 24px; padding: 30px; width: 85%; max-width: 400px;
    text-align: center; position: relative; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.close-btn { position: absolute; top: 15px; right: 20px; font-size: 28px; color: #fff; cursor: pointer; }
.modal-title { color: var(--gold); font-size: 20px; margin-bottom: 20px; }
.result-img-box {
    width: 100%; aspect-ratio: 1/1; border-radius: 16px; overflow: hidden;
    border: 2px solid var(--gold); box-shadow: 0 0 30px var(--gold-glow); margin-bottom: 15px;
}
.result-img-box img { width: 100%; height: 100%; object-fit: cover; }
.tips { font-size: 12px; color: #aaa; margin-bottom: 20px; line-height: 1.5; }

.btn-gold {
    background: transparent; border: 1px solid var(--gold); color: var(--gold);
    padding: 12px 30px; border-radius: 25px; font-size: 14px; cursor: pointer; transition: 0.3s;
}
.btn-gold:hover { background: var(--gold); color: #000; }