/* 随盒 · 全站共享样式 v2.0 */
/* 设计原则：高级感、清新、深度、移动端友好 */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #0a0a1a;
    --bg-soft: #14142b;
    --gold: #d4af37;
    --gold-light: #ffd700;
    --gold-deep: #b8941f;
    --purple: #8a2be2;
    --purple-light: #a855f7;
    --text: #fff;
    --text-mid: #ccc;
    --text-dim: #888;
    --border: rgba(212, 175, 55, 0.2);
    --border-strong: rgba(212, 175, 55, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 星空背景 - 通用 */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* 光晕 */
.glow {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(1.15); opacity: 0.8; }
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 顶部导航 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}
.back {
    color: var(--gold);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.back:hover { opacity: 0.7; }
.top-title { font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.top-right { color: var(--text-dim); font-size: 12px; }

/* 大标题 */
.big-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin: 30px 0 8px;
    letter-spacing: -0.5px;
}
.big-title .gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subtitle {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 输入框 */
.input-area {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
textarea, input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}
textarea:focus, input:focus {
    outline: none;
    border-color: var(--gold);
}
textarea::placeholder, input::placeholder { color: #555; }

/* 主按钮 */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    border-radius: 12px;
    color: var(--bg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transition: all 0.2s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--gold);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(212, 175, 55, 0.08); }
.btn-secondary:active { transform: scale(0.98); }

/* 选项按钮组 */
.option-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.option-btn {
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-mid);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.option-btn:hover { background: rgba(255, 255, 255, 0.06); }
.option-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(138, 43, 226, 0.15));
    border-color: var(--gold);
    color: var(--text);
}
.option-btn .icon { display: block; font-size: 20px; margin-bottom: 4px; }

/* 结果卡片 */
.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 12px;
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 操作按钮组 */
.action-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.6;
}
.footer a { color: var(--gold); text-decoration: none; }

/* 移动端适配 */
@media (max-width: 480px) {
    .big-title { font-size: 26px; }
    .container { padding: 0 16px; }
    .input-area { padding: 16px; }
    textarea, input[type="text"] { font-size: 16px; } /* 防 iOS 缩放 */
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.5); }

/* 选中文本 */
::selection { background: rgba(212, 175, 55, 0.3); color: #fff; }