/* ================================================
   人教培训服务 - Claude 浅色优雅主题 (Mobile First)
   ================================================ */

:root {
    --bg-primary: #fdfcf5;
    --bg-surface: #ffffff;
    --border: #e8e6df;
    --border-focus: #d8785e;
    --text-primary: #2d2825;
    --text-secondary: #6e6b66;
    --text-muted: #a3a09b;
    --accent: #d8785e;
    --accent-hover: #c4664c;
    --accent-glow: rgba(216, 120, 94, 0.15);
    --success: #4a8b5e;
    --error: #cc4f4f;
    --font-serif: 'Noto Serif SC', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-lg: 24px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

html, body {
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* ==================== 居中容器 ==================== */
.centered-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ==================== 核心提示区域 ==================== */
.prompt-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.main-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ==================== 文本排版 ==================== */
h1#main-prompt {
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

p#sub-prompt {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

/* ==================== 输入区域 ==================== */
.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    position: absolute;
}

#user-input {
    width: 100%;
    padding: 22px 28px;
    padding-right: 60px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 19px;
    font-family: var(--font-sans);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
}

#user-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
}

#user-input::placeholder {
    color: var(--text-muted);
}

#user-input:disabled {
    background: #f5f4ef;
    color: var(--text-secondary);
    cursor: not-allowed;
}

.unified-input {
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 17px;
    font-family: var(--font-sans);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type="number"] {
    -moz-appearance: textfield;
}

.unified-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
}

.unified-input::placeholder {
    color: var(--text-muted);
}

#resend-btn {
    position: absolute;
    right: 68px; /* 位于右箭头左侧 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--accent);
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 6px;
}

#resend-btn:hover:not(:disabled) {
    background: rgba(216, 120, 94, 0.1);
}

#resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    background: none;
}

#send-btn {
    position: absolute;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: 44px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: var(--bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#send-btn:hover:not(:disabled) {
    background: #e3866d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 120, 94, 0.3);
}

#send-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: none;
}

#send-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==================== 选项按钮（学段/学科等） ==================== */
.choices-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
    transition: opacity 0.3s ease;
}

.choice-btn {
    padding: 16px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.choice-btn:hover {
    border-color: var(--border-focus);
    background: #fffafa;
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.choice-btn.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.choice-btn.selected span {
    color: white !important;
}

.action-btn.primary {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: var(--bg-surface);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn.primary:hover {
    background: #e3866d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 120, 94, 0.3);
}

.action-btn.primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ==================== 状态提示 ==================== */
.status-message {
    font-size: 15px;
    font-weight: 500;
    min-height: 24px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.status-message:empty {
    display: none;
}

.status-message.success { color: var(--success); }
.status-message.error { color: var(--error); }
.status-message.loading { color: var(--text-secondary); }

/* ==================== 用户信息卡片 ==================== */
.info-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
    text-align: left;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.info-card h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 16px;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== 动画 ==================== */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}

/* ==================== 页脚 ==================== */
.site-footer {
    position: static;
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.thinking-text {
    display: inline-block;
    position: relative;
    color: var(--accent);
    animation: text-breathe 1.8s ease-in-out infinite;
    font-weight: 500;
}
@keyframes text-breathe {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 8px rgba(216, 120, 94, 0.3);
    }
    50% { 
        opacity: 0.4; 
        text-shadow: 0 0 0px rgba(216, 120, 94, 0);
    }
}

.claude-icon {
    animation: breathe 2.5s ease-in-out infinite;
    transform-origin: center;
}

.inline-claude-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    animation: breathe 2.5s ease-in-out infinite;
    transform-origin: center;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .main-icon { width: 44px; height: 44px; }
    h1#main-prompt { font-size: 32px; }
    p#sub-prompt { font-size: 16px; }
    #user-input { padding: 18px 24px; font-size: 17px; }
    .choice-btn { padding: 14px 24px; font-size: 16px; }
}

@media (max-width: 480px) {
    .prompt-container { gap: 10px; }
    .main-icon { width: 36px; height: 36px; }
    h1#main-prompt { font-size: 28px; }
    #user-input { padding: 16px 20px; font-size: 16px; }
    .choice-btn { padding: 12px 20px; font-size: 15px; width: 100%; }
    .info-card { padding: 24px 20px; }
    .site-footer { position: static; margin-top: auto; padding-bottom: 16px; }
}
