* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f6f7fb;
    color: #1f2937;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.hero {
    background: linear-gradient(135deg, #6c7bff, #ff9ac6);
    border-radius: 24px;
    padding: 32px;
    color: #fff;
    box-shadow: 0 18px 40px rgba(108, 123, 255, 0.2);
    margin-bottom: 28px;
}

.hero-badge {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 12px;
    text-transform: uppercase;
}

.hero h1 {
    margin: 16px 0 8px;
    font-size: 32px;
}

.hero p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.search-box {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
}

.control-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    background: #6c7bff;
    color: #fff;
    box-shadow: 0 10px 20px rgba(108, 123, 255, 0.25);
}

.btn.ghost {
    background: #fff;
    color: #6c7bff;
    border: 1px solid #dbe1ff;
    box-shadow: none;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.chip {
    border: none;
    background: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    margin-bottom: 24px;
}

.panel-title {
    font-weight: 700;
    margin-bottom: 12px;
}

.mindmap-panel,
.detail-panel {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.detail-panel {
    position: sticky;
    top: 20px;
    align-self: start;
}

.mindmap {
    list-style: none;
    margin: 0;
    padding: 0;
}

.node-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.node-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.node-row:hover {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.node-row.active {
    border-color: #6c7bff;
    background: #e0e7ff;
}

.node-title {
    font-weight: 700;
}

.node-sub {
    font-size: 12px;
    color: #6b7280;
}

.toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    font-weight: 700;
}

.children {
    margin: 0 0 10px 24px;
    padding-left: 18px;
    border-left: 2px dashed #e5e7eb;
}

.children.collapsed {
    display: none;
}

.detail-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-title {
    font-size: 18px;
    font-weight: 800;
}

.detail-text {
    color: #6b7280;
    line-height: 1.6;
}

.detail-list {
    display: grid;
    gap: 8px;
}

.detail-list span {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
}

.match {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

.summary-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.summary-card h2 {
    margin: 0 0 8px;
}

@media (max-width: 960px) {
    .content {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        position: static;
        top: auto;
    }
}
