/* =========================================================
   style.css - AI 项目计划生成器
   森绿暗夜系 · 配套8000版课程
   ========================================================= */

/* ---------- 全局 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background-color: #0a0f1c;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ---------- 背景装饰 ---------- */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 255, 209, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 209, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(0, 255, 209, 0.06) 0%, transparent 70%);
}

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

/* ---------- 页面切换 ---------- */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 头部 ---------- */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffd1, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #94a3b8;
    font-size: 15px;
}

/* ---------- 表单卡片 ---------- */
.form-card {
    background: rgba(10, 14, 22, 0.88);
    border: 1px solid rgba(0, 255, 209, 0.15);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 0 40px rgba(0, 255, 209, 0.06), 0 8px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

/* ---------- 表单元素 ---------- */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.label-icon {
    margin-right: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 209, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    color: #e2e8f0;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: rgba(0, 255, 209, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 255, 209, 0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300ffd1' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-tip {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.6);
    margin-top: 6px;
}

/* ---------- 行内布局 ---------- */
.form-row {
    display: flex;
    gap: 16px;
}

.flex-1 {
    flex: 1;
}

/* ---------- 提交按钮 ---------- */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #00ffd1, #00c6ff);
    color: #0a0f1c;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 255, 209, 0.28);
}

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

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(10, 15, 28, 0.3);
    border-top-color: #0a0f1c;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.btn-submit.loading .btn-icon {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- 底部 ---------- */
.footer-links {
    text-align: center;
    margin-top: 40px;
}

.footer-divider {
    color: rgba(0, 255, 209, 0.15);
    letter-spacing: 4px;
    display: block;
    margin-bottom: 16px;
}

.footer-text {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-link {
    color: #00ffd1;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-link:hover {
    color: #00c6ff;
    text-shadow: 0 0 12px rgba(0, 255, 209, 0.3);
}

/* ---------- 结果页 ---------- */
.btn-back-top {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 209, 0.15);
    color: #94a3b8;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 24px;
    transition: all 0.3s;
}

.btn-back-top:hover {
    color: #00ffd1;
    border-color: rgba(0, 255, 209, 0.35);
}

/* ---------- 结果卡片 ---------- */
.result-card {
    background: rgba(10, 14, 22, 0.92);
    border: 1px solid rgba(0, 255, 209, 0.15);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 0 40px rgba(0, 255, 209, 0.06), 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* 结果标题区域 */
.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 255, 209, 0.1);
}

.result-header .icon {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}

.result-header h1 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffd1, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.result-header .meta {
    color: #94a3b8;
    font-size: 13px;
}

/* 通用 section 样式 */
.result-section {
    margin-bottom: 28px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 209, 0.06);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #00ffd1;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-body {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.8;
}

/* 阶段卡片 */
.phase-card {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border-left: 3px solid #00ffd1;
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.phase-name {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}

.phase-date {
    font-size: 13px;
    color: #94a3b8;
}

/* 进度条 */
.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-bottom: 14px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffd1, #00c6ff);
    border-radius: 2px;
    transition: width 1s ease;
}

/* 任务列表 */
.task-list {
    list-style: none;
    padding: 0;
}

.task-item {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: #cbd5e1;
}

.task-item::before {
    content: '□';
    position: absolute;
    left: 0;
    color: rgba(0, 255, 209, 0.5);
}

.task-item.milestone {
    font-weight: 600;
    color: #00ffd1;
}

.task-item.milestone::before {
    content: '◆';
    color: #00ffd1;
}

/* 团队分工 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.team-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 209, 0.08);
}

.team-role {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.team-desc {
    font-size: 12px;
    color: #94a3b8;
}

/* 风险列表 */
.risk-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid rgba(0, 255, 209, 0.2);
}

.risk-level {
    font-size: 14px;
    flex-shrink: 0;
}

.risk-text {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
}

.risk-solution {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

/* 推荐工具 */
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-tag {
    padding: 6px 14px;
    background: rgba(0, 255, 209, 0.08);
    border: 1px solid rgba(0, 255, 209, 0.15);
    border-radius: 20px;
    font-size: 13px;
    color: #00ffd1;
}

/* ---------- 结果操作栏 ---------- */
.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-regenerate {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 209, 0.15);
    color: #94a3b8;
}

.btn-regenerate:hover {
    color: #e2e8f0;
    border-color: rgba(0, 255, 209, 0.3);
}

.btn-save {
    background: linear-gradient(135deg, #00c6ff, #00e5ff);
    color: #0a0f1c;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 198, 255, 0.3);
}

.btn-course {
    background: linear-gradient(135deg, #00ffd1, #00c6ff);
    color: #0a0f1c;
}

.btn-course:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 209, 0.3);
}

/* ---------- 导出水印 ---------- */
.watermark {
    text-align: center;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.4);
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 255, 209, 0.06);
}

/* ---------- Toast 提示 ---------- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(0, 255, 209, 0.9);
    color: #0a0f1c;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .container {
        padding: 20px 12px 40px;
    }
    .form-card {
        padding: 20px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .result-card {
        padding: 20px 16px;
    }
    .result-actions {
        flex-direction: column;
    }
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    .logo-text {
        font-size: 20px;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
}
