/* ==================== CSS Variables ==================== */
:root {
    /* 东方古典配色 */
    --ink-black: #1a1a2e;
    --deep-purple: #16213e;
    --gold: #d4af37;
    --gold-light: #f4e4ba;
    --cream: #faf8f5;
    --warm-gray: #8b8b7a;
    
    /* 功能色 */
    --success: #2d6a4f;
    --warning: #b5651d;
    --danger: #9b2226;
    
    /* 文字 */
    --text-primary: #faf8f5;
    --text-secondary: #a0a0a0;
    
    /* 间距 */
    --section-padding: 80px 20px;
    --card-radius: 12px;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
    background: var(--ink-black);
    color: var(--text-primary);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==================== Header ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--ink-black) 0%, transparent 100%);
    padding: 20px 40px;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.logo span {
    font-size: 1rem;
    color: var(--gold-light);
    display: block;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav a {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav a:hover {
    color: var(--gold);
}

.nav a:hover::after {
    width: 100%;
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 40px 80px;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(22, 33, 62, 0.8) 0%, transparent 50%),
        var(--ink-black);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 300;
}

.hero-text .desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 60px;
    margin-top: 50px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Hero Visual - 动态圆形 */
.hero-visual {
    position: relative;
    height: 500px;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
}

.orbit-1 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 30s linear infinite;
}

.orbit-2 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 45s linear infinite reverse;
}

.orbit-3 {
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 60s linear infinite;
}

.orbit-node {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--deep-purple);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.orbit-node:hover {
    transform: scale(1.15);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
}

.orbit-node span {
    font-size: 0.65rem;
    color: var(--gold-light);
    margin-top: 4px;
}

.center-node {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--gold) 0%, #8b6914 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.5);
    z-index: 10;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 节点位置 */
.node-1 { top: -40px; left: 50%; transform: translateX(-50%); }
.node-2 { top: 50%; right: -40px; transform: translateY(-50%); }
.node-3 { bottom: -40px; left: 50%; transform: translateX(-50%); }
.node-4 { top: 50%; left: -40px; transform: translateY(-50%); }

.node-5 { top: 10%; right: 10%; }
.node-6 { bottom: 10%; right: 10%; }
.node-7 { bottom: 10%; left: 10%; }
.node-8 { top: 10%; left: 10%; }

/* ==================== Section Base ==================== */
.section {
    padding: var(--section-padding);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ==================== Knowledge Constellation ==================== */
.constellation-section {
    background: var(--deep-purple);
    padding: 100px 0;
}

.constellation-container {
    position: relative;
    height: 700px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.constellation-canvas {
    width: 100%;
    height: 100%;
}

.constellation-legend {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    background: rgba(26, 26, 46, 0.9);
    padding: 15px 30px;
    border-radius: 30px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.philosophy { background: #e74c3c; }
.legend-dot.valuation { background: #3498db; }
.legend-dot.business { background: #2ecc71; }
.legend-dot.capital { background: #f39c12; }

/* ==================== Concept Cards - 翻转卡片 ==================== */
.concepts-section {
    padding: 100px 40px;
    background: var(--ink-black);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.flip-card {
    height: 320px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--card-radius);
    padding: 30px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.flip-card-front {
    background: linear-gradient(145deg, var(--deep-purple) 0%, var(--ink-black) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flip-card-front .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.flip-card-front h3 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.flip-card-front .brief {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.flip-card-back {
    background: linear-gradient(145deg, var(--gold) 0%, #8b6914 100%);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flip-card-back h4 {
    font-size: 1.2rem;
    color: var(--ink-black);
    margin-bottom: 15px;
}

.flip-card-back p {
    font-size: 0.9rem;
    color: var(--ink-black);
    margin-bottom: 20px;
}

.flip-card-back .related {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flip-card-back .tag {
    background: rgba(26, 26, 46, 0.2);
    color: var(--ink-black);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* ==================== Timeline - 竖向时间轴 ==================== */
.timeline-section {
    padding: 100px 40px;
    background: var(--deep-purple);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--gold) 0%, rgba(212, 175, 55, 0.1) 100%);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--gold);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.timeline-content {
    width: 45%;
    background: var(--ink-black);
    padding: 30px;
    border-radius: var(--card-radius);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.timeline-period {
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--gold-light);
    margin-bottom: 15px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-tags span {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
}

.timeline-tags span:hover {
    background: rgba(212, 175, 55, 0.3);
}

/* ==================== Quote Cards - 对话气泡风格 ==================== */
.quotes-section {
    padding: 100px 40px;
    background: var(--ink-black);
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.quote-card {
    background: var(--deep-purple);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.quote-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 6rem;
    color: rgba(212, 175, 55, 0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quote-author .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    object-fit: cover;
}

.quote-author .info .name {
    font-size: 1.1rem;
    color: var(--gold);
    font-weight: 600;
}

.quote-author .info .role {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quote-card.buffett {
    border-left: 4px solid var(--gold);
}

.quote-card.munger {
    border-right: 4px solid var(--gold);
}

/* ==================== Framework Section ==================== */
.framework-section {
    padding: 100px 40px;
    background: var(--deep-purple);
}

.framework-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.framework-card {
    background: var(--ink-black);
    border-radius: var(--card-radius);
    padding: 40px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.framework-card h3 {
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 30px;
    text-align: center;
}

.framework-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.framework-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gold);
    color: var(--ink-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content strong {
    color: var(--gold-light);
    display: block;
    margin-bottom: 5px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.step-content a {
    display: inline-block;
    color: var(--gold);
    font-size: 0.85rem;
    margin-top: 8px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.step-content a:hover {
    border-color: var(--gold);
}

/* ==================== Mistakes Section ==================== */
.mistakes-section {
    padding: 100px 40px;
    background: var(--ink-black);
}

.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.mistake-card {
    background: var(--deep-purple);
    border-radius: var(--card-radius);
    padding: 30px;
    border: 1px solid rgba(155, 34, 38, 0.3);
    transition: transform 0.3s, border-color 0.3s;
}

.mistake-card:hover {
    transform: translateY(-5px);
    border-color: rgba(155, 34, 38, 0.6);
}

.mistake-card .icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.mistake-card h4 {
    font-size: 1.1rem;
    color: var(--gold-light);
    margin-bottom: 15px;
}

.mistake-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.mistake-card .links {
    display: flex;
    gap: 10px;
}

.mistake-card .links span {
    background: rgba(155, 34, 38, 0.2);
    color: #ff6b6b;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
}

.mistake-card .links span:hover {
    background: rgba(155, 34, 38, 0.4);
}

/* ==================== Footer ==================== */
.footer {
    background: var(--deep-purple);
    padding: 60px 40px 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer h4 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer ul a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-bottom p {
    font-size: 0.85rem;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--deep-purple);
    border-radius: 20px;
    padding: 50px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(212, 175, 55, 0.3);
}

.modal-content h2 {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-content .subtitle {
    color: var(--gold-light);
    font-size: 1rem;
    margin-bottom: 30px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    color: var(--gold-light);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.modal-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-section blockquote {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--gold);
    padding: 20px;
    margin: 15px 0;
    font-style: italic;
    color: var(--text-primary);
    border-radius: 0 10px 10px 0;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.modal-tags span {
    background: var(--gold);
    color: var(--ink-black);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.modal-tags span:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-visual {
        height: 400px;
    }
    
    .framework-grid,
    .mistakes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quotes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-visual {
        display: none;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: row;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 50px;
    }
    
    .timeline-item::before {
        left: 20px;
    }
    
    .framework-grid,
    .mistakes-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==================== 辅助类 ==================== */
.hidden {
    display: none !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ink-black);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}
