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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #2d3748;
    background: #fff5f7;
}

/* ===== 导航栏 ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #e8789a 0%, #f0a0b8 100%);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(232, 120, 154, 0.3);
}

.nav-back {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.35);
}

.nav-title {
    flex: 1;
    text-align: center;
    color: white;
    font-size: 1.3rem;
}

/* ===== 主内容 ===== */
.content {
    margin-top: 60px;
    padding: 40px 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Hero ===== */
.skill-hero {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(232, 120, 154, 0.1);
    border: 2px solid rgba(232, 120, 154, 0.15);
}

.skill-hero h2 {
    font-size: 2rem;
    color: #d63384;
    margin-bottom: 15px;
}

.skill-hero p {
    font-size: 1.1rem;
    color: #6b7280;
}

/* ===== 技能区域 ===== */
.skill-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(232, 120, 154, 0.08);
    border: 2px solid rgba(232, 120, 154, 0.1);
}

.skill-section h3 {
    font-size: 1.3rem;
    color: #d63384;
    margin-bottom: 20px;
}

/* ===== 技能卡片 ===== */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-card {
    text-align: center;
    padding: 25px 15px;
    background: linear-gradient(135deg, #fff5f7, #fff0f3);
    border-radius: 16px;
    border: 2px solid rgba(232, 120, 154, 0.12);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(232, 120, 154, 0.15);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.skill-card h4 {
    color: #d63384;
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ===== 工具进度条 ===== */
.tools-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tool-name {
    width: 100px;
    font-weight: 600;
    color: #4a5568;
    text-align: right;
    flex-shrink: 0;
}

.tool-bar {
    flex: 1;
    height: 12px;
    background: #f3e8ed;
    border-radius: 6px;
    overflow: hidden;
}

.tool-fill {
    height: 100%;
    background: linear-gradient(90deg, #e8789a, #f0a0b8);
    border-radius: 6px;
    transition: width 1s ease;
}

.tool-level {
    width: 50px;
    font-size: 0.85rem;
    color: #e8789a;
    font-weight: 600;
}

/* ===== 案例列表 ===== */
.case-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.case-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #fff9fb;
    border-radius: 12px;
    border-left: 4px solid #e8789a;
    transition: all 0.3s ease;
}

.case-item:hover {
    background: #fff0f3;
}

.case-num {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd6e7;
    line-height: 1;
}

.case-info h4 {
    color: #d63384;
    margin-bottom: 5px;
}

.case-info p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ===== 原则网格 ===== */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.principle-item {
    text-align: center;
    padding: 25px 15px;
    background: linear-gradient(135deg, #fff5f7, #fce4f0);
    border-radius: 16px;
    border: 2px dashed rgba(232, 120, 154, 0.25);
}

.principle-num {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    background: linear-gradient(135deg, #e8789a, #d63384);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-bottom: 10px;
}

.principle-item h4 {
    color: #d63384;
    margin-bottom: 8px;
}

.principle-item p {
    font-size: 0.85rem;
    color: #6b7280;
}

/* ===== 代码块 ===== */
.code-block {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #2d2d3d;
    color: #a0aec0;
    font-size: 0.85rem;
}

.copy-btn {
    background: transparent;
    border: 1px solid #4a5568;
    color: #a0aec0;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    border-color: #e8789a;
    color: #e8789a;
}

.code-block pre {
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.6;
}

/* ===== 技巧列表 ===== */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: #fff9fb;
    border-radius: 12px;
    border: 1px solid rgba(232, 120, 154, 0.12);
}

.tip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e8789a, #d63384);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-content h4 {
    color: #d63384;
    margin-bottom: 4px;
}

.tip-content p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ===== 公式表格 ===== */
.formula-table {
    overflow-x: auto;
}

.formula-table table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

.formula-table th {
    background: linear-gradient(135deg, #e8789a, #d63384);
    color: white;
    padding: 12px 16px;
    text-align: left;
}

.formula-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #fce4f0;
}

.formula-table tr:last-child td {
    border-bottom: none;
}

.formula-table tr:hover td {
    background: #fff5f7;
}

.formula-table code {
    background: #fff0f3;
    color: #d63384;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ===== 格言 ===== */
.skill-quote {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #fff0f3, #fce4f0);
    border-radius: 20px;
    border: 2px dashed rgba(232, 120, 154, 0.25);
    margin-bottom: 30px;
}

.skill-quote p {
    font-size: 1.15rem;
    color: #9a6a82;
    font-style: italic;
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e8789a, #d63384);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(232, 120, 154, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 800;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(232, 120, 154, 0.5);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .content {
        padding: 20px 15px;
    }

    .skill-hero h2 {
        font-size: 1.6rem;
    }

    .skill-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tool-item {
        flex-wrap: wrap;
    }

    .tool-name {
        width: auto;
        text-align: left;
    }

    .formula-table code {
        font-size: 0.75rem;
    }
}
