        :root {
            --primary: #8B4513;
            --primary-light: #A0522D;
            --accent: #D2691E;
            --bg: #FDF8F0;
            --card-bg: #FFFFFF;
            --text: #3E2723;
            --text-light: #6D4C41;
            --border: #D7CCC8;
            --shadow: 0 4px 20px rgba(62, 39, 35, 0.08);
            --shadow-hover: 0 8px 30px rgba(62, 39, 35, 0.12);
            --radius: 16px;
            --success: #4CAF50;
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
        }

        /* Main Layout */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem 1.5rem;
        }

        .page-header {
            text-align: center;
            margin-bottom: 2.5rem;
        }

        h1 {
            font-size: 2rem;
            color: var(--primary);
            margin-bottom: 0.5rem;
            font-weight: 700;
        }

        .subtitle {
            color: var(--text-light);
            font-size: 1.05rem;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Tool Grid */
        .tool-grid {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 2rem;
            margin-bottom: 3rem;
        }

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

        /* Fish Area */
        .fish-area {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 2.5rem;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            overflow: hidden;
            min-height: 500px;
            user-select: none;
        }

        .fish-area::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
        }

        /* Merit Display */
        .merit-display {
            text-align: center;
            margin-bottom: 2rem;
            z-index: 2;
        }

        .merit-label {
            font-size: 0.9rem;
            color: var(--text-light);
            margin-bottom: 0.3rem;
            letter-spacing: 2px;
        }

        .merit-count {
            font-size: 3.5rem;
            font-weight: 700;
            color: var(--primary);
            font-variant-numeric: tabular-nums;
            line-height: 1;
            text-shadow: 2px 2px 0px rgba(139, 69, 19, 0.1);
        }

        /* Progress */
        .goal-progress {
            width: 100%;
            max-width: 300px;
            margin: 1rem 0 2rem;
        }

        .progress-bar-bg {
            width: 100%;
            height: 8px;
            background: #EFEBE9;
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            border-radius: 4px;
            transition: width 0.5s ease;
            width: 0%;
        }

        .progress-text {
            text-align: center;
            font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 0.5rem;
        }

        /* Wooden Fish SVG */
        .fish-container {
            position: relative;
            width: 280px;
            height: 220px;
            cursor: pointer;
            z-index: 2;
            transition: transform 0.1s;
        }

        .fish-container:active {
            transform: scale(0.96);
        }

        .fish-container.tapped {
            animation: tapShake 0.15s ease;
        }

        @keyframes tapShake {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(0.92) rotate(-2deg); }
        }

        .stick {
            position: absolute;
            top: -60px;
            right: -99px;
            width: 150px;
            height: 150px;
            pointer-events: none;
            transform-origin: 50% 95%;
            transform: rotate(-35deg); 
            transition: transform 0.1s;
            z-index: 3;
        }

        .fish-container.tapped .stick {
            transform: rotate(-65deg);
        }

        /* Floating Text */
        .float-text {
            position: absolute;
            font-size: 1.2rem;
            color: var(--accent);
            font-weight: 700;
            pointer-events: none;
            opacity: 0;
            animation: floatUp 1s ease-out forwards;
            z-index: 10;
            text-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        @keyframes floatUp {
            0% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
            100% {
                opacity: 0;
                transform: translateY(-80px) scale(1.3);
            }
        }

        /* Sutra Display */
        .sutra-display {
            margin-top: 2rem;
            padding: 1rem 2rem;
            background: linear-gradient(135deg, #FFF8E1, #FFECB3);
            border-radius: 12px;
            border: 1px solid #FFE082;
            min-height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
        }

        .sutra-text {
            font-size: 1.3rem;
            color: var(--primary);
            font-weight: 600;
            letter-spacing: 4px;
        }

        /* Controls Panel */
        .controls-panel {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 1.8rem;
            box-shadow: var(--shadow);
            height: fit-content;
            position: sticky;
            top: 90px;
        }

        .controls-panel::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--accent), var(--primary-light));
            border-radius: var(--radius) var(--radius) 0 0;
        }

        .panel-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 1.5rem;
            padding-bottom: 0.8rem;
            border-bottom: 2px solid var(--bg);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .control-group {
            margin-bottom: 1.5rem;
        }

        .control-label {
            font-size: 0.9rem;
            color: var(--text-light);
            margin-bottom: 0.6rem;
            display: block;
            font-weight: 600;
        }

        /* Toggle Switch */
        .toggle-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .toggle-label {
            font-size: 0.95rem;
            color: var(--text);
        }

        .toggle-switch {
            position: relative;
            width: 48px;
            height: 26px;
            background: var(--border);
            border-radius: 13px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .toggle-switch.active {
            background: var(--success);
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 20px;
            height: 20px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.3s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }

        .toggle-switch.active::after {
            transform: translateX(22px);
        }

        /* Select & Input */
        .select-styled {
            width: 100%;
            padding: 0.7rem 1rem;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 0.95rem;
            color: var(--text);
            background: var(--bg);
            cursor: pointer;
            outline: none;
            transition: border-color 0.3s;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236D4C41' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
        }

        .select-styled:focus {
            border-color: var(--accent);
        }

        .input-styled {
            width: 100%;
            padding: 0.7rem 1rem;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 0.95rem;
            color: var(--text);
            background: var(--bg);
            outline: none;
            transition: border-color 0.3s;
        }

        .input-styled:focus {
            border-color: var(--accent);
        }

        /* Range Slider */
        .range-row {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .range-slider {
            flex: 1;
            -webkit-appearance: none;
            height: 6px;
            border-radius: 3px;
            background: var(--border);
            outline: none;
        }

        .range-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        }

        .range-value {
            min-width: 3rem;
            text-align: center;
            font-size: 0.9rem;
            color: var(--primary);
            font-weight: 600;
        }

        /* Buttons */
        .btn {
            width: 100%;
            padding: 0.85rem;
            border: none;
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: #fff;
            box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
        }

        .btn-secondary {
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--border);
            margin-top: 0.8rem;
        }

        .btn-secondary:hover {
            background: var(--border);
        }

        /* Content Sections */
        .content-section {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 2.5rem;
            box-shadow: var(--shadow);
            margin-bottom: 2rem;
        }

        .content-section h2 {
            font-size: 1.4rem;
            color: var(--primary);
            margin-bottom: 1.2rem;
            padding-bottom: 0.6rem;
            border-bottom: 2px solid var(--bg);
        }

        .content-section h3 {
            font-size: 1.15rem;
            color: var(--primary-light);
            margin: 1.5rem 0 0.8rem;
        }

        .content-section p {
            color: var(--text-light);
            margin-bottom: 1rem;
            line-height: 1.8;
        }

        .content-section ul {
            margin-left: 1.5rem;
            margin-bottom: 1rem;
            color: var(--text-light);
        }

        .content-section li {
            margin-bottom: 0.5rem;
            line-height: 1.7;
        }

        /* FAQ */
        .faq-item {
            border: 1px solid var(--border);
            border-radius: 12px;
            margin-bottom: 1rem;
            overflow: hidden;
        }

        .faq-item summary {
            padding: 1rem 1.5rem;
            cursor: pointer;
            font-weight: 600;
            color: var(--text);
            background: var(--bg);
            list-style: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background 0.3s;
        }

        .faq-item summary:hover {
            background: #EFEBE9;
        }

        .faq-item summary::after {
            content: '+';
            font-size: 1.3rem;
            color: var(--accent);
            font-weight: 400;
        }

        .faq-item[open] summary::after {
            content: '−';
        }

        .faq-item .faq-answer {
            padding: 1rem 1.5rem;
            color: var(--text-light);
            line-height: 1.8;
            background: var(--card-bg);
        }

        /* Footer */
        footer {
            background: #4E342E;
            color: rgba(255,255,255,0.8);
            padding: 2.5rem 0 1.5rem;
            margin-top: 3rem;
        }

        .footer-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1.5rem;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 2rem;
        }

        @media (max-width: 768px) {
            .footer-inner {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
        }


        .footer-bottom {
            max-width: 1200px;
            margin: 2rem auto 0;
            padding: 1.5rem 1.5rem 0;
            border-top: 1px solid rgba(255,255,255,0.1);
            text-align: center;
            font-size: 0.85rem;
            color: rgba(255,255,255,0.5);
        }

        /* Ripple Effect */
        .ripple {
            position: absolute;
            border-radius: 50%;
            background: rgba(210, 105, 30, 0.15);
            transform: scale(0);
            animation: rippleEffect 0.6s ease-out;
            pointer-events: none;
        }

        @keyframes rippleEffect {
            to {
                transform: scale(4);
                opacity: 0;
            }
        }

        /* Mobile */
        @media (max-width: 768px) {
            h1 { font-size: 1.5rem; }
                .fish-container { 
                width: 220px; 
                height: 180px; 
            }
            body.immersive .fish-container {
                width: 260px;  /* 沉浸模式下比默认稍大，但不会溢出 */
                height: 200px;
            }
            .merit-count { font-size: 2.5rem; }
            .fish-area { padding: 1.5rem; min-height: 400px; }
            .controls-panel { position: static; }
            .nav-links { gap: 1rem; }
        }

        /* Focus styles for accessibility */
        button:focus-visible,
        select:focus-visible,
        input:focus-visible,
        summary:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

/* 沉浸模式 */
body.immersive {
    background: #1a120b;
    overflow: hidden;
    transition: background 0.8s ease;
}

body.immersive header,
body.immersive .controls-panel,
body.immersive .content-section,
body.immersive footer,
body.immersive .page-header h1,
body.immersive .page-header .subtitle,
body.immersive .merit-label,
body.immersive .merit-unit {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

body.immersive .page-header {
    margin-bottom: 0;
    height: 0;
    overflow: hidden;
}

body.immersive .tool-grid {
    grid-template-columns: 1fr;
    place-items: center;
    min-height: 100vh;
    margin-bottom: 0;
}

body.immersive .fish-area {
    background: transparent;
    box-shadow: none;
    min-height: 80vh;
    justify-content: center;
}

body.immersive .fish-area::before {
    display: none;
}

body.immersive .fish-container {
    width: 360px;
    height: 280px;
    filter: drop-shadow(0 0 40px rgba(210, 105, 30, 0.15));
    animation: breathe 4s ease-in-out infinite;
}

body.immersive .merit-count {
    color: #D7CCC8;
    text-shadow: 0 0 20px rgba(210, 105, 30, 0.3);
}

body.immersive .sutra-display {
    background: rgba(255, 248, 225, 0.05);
    border-color: rgba(255, 236, 179, 0.1);
}

body.immersive .sutra-text {
    color: #FFE082;
    letter-spacing: 8px;
}

body.immersive #immersiveBtn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    opacity: 0.6;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

body.immersive #immersiveBtn:hover {
    opacity: 1;
}

/* 呼吸光效 */
@keyframes breathe {
    0%, 100% { 
        filter: drop-shadow(0 0 30px rgba(210, 105, 30, 0.1));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 60px rgba(210, 105, 30, 0.25));
        transform: scale(1.02);
    }
}

/* 粒子画布 */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

body.immersive #particleCanvas {
    opacity: 1;
}

/* 移动端沉浸模式适配 */
@media (max-width: 768px) {
    body.immersive .tool-grid {
        min-height: 100vh;
        padding: 0;
    }
    
    body.immersive .fish-area {
        min-height: 100vh;
        padding: 1rem;
        width: 100%;
    }
    
    body.immersive .fish-container {
        width: 260px;      /* 原来是 360px，移动端缩小 */
        height: 200px;     /* 原来是 280px，按比例缩小 */
    }
    
    body.immersive .merit-count {
        font-size: 2.5rem; /* 缩小功德数字 */
    }
    
    body.immersive .sutra-text {
        font-size: 1.1rem; /* 缩小经文 */
        letter-spacing: 4px;
    }
    
    body.immersive #immersiveBtn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* 超小屏手机 */
@media (max-width: 380px) {
    body.immersive .fish-container {
        width: 220px;
        height: 170px;
    }
    
    body.immersive .merit-count {
        font-size: 2rem;
    }
}


.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-links ul {
        gap: 1rem;
    }
}