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

:root {
    --primary-healing: #7ec8b5;
    --primary-warm: #f5a962;
    --primary-calm: #8fb9a8;
    --bg-soft: #f8faf9;
    --bg-card: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --border-light: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

html {
    font-size: 16px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, var(--bg-soft) 0%, #f0f7f4 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 1.25rem;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-healing);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🌿';
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(126, 200, 181, 0.1);
    color: var(--primary-healing);
}

.page-title {
    text-align: center;
    padding: 2.5rem 0 2rem;
    color: var(--text-primary);
}

.page-title h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(126, 200, 181, 0.2);
}

.card-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.05);
}

.card-icon.healing {
    background: linear-gradient(135deg, rgba(126, 200, 181, 0.15) 0%, rgba(143, 185, 168, 0.1) 100%);
    color: var(--primary-healing);
}

.card-icon.warm {
    background: linear-gradient(135deg, rgba(245, 169, 98, 0.15) 0%, rgba(245, 180, 120, 0.1) 100%);
    color: var(--primary-warm);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    text-decoration: none;
    text-align: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-healing) 0%, var(--primary-calm) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(126, 200, 181, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(126, 200, 181, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-warm) 0%, #f7b87e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 169, 98, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 169, 98, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary-healing);
    color: var(--primary-healing);
}

.btn-outline:hover {
    background: var(--primary-healing);
    color: white;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.25s ease;
    background: var(--bg-card);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-healing);
    box-shadow: 0 0 0 3px rgba(126, 200, 181, 0.1);
}

.progress-bar {
    background: #e8f0ed;
    border-radius: var(--radius-md);
    height: 0.625rem;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-healing), var(--primary-calm));
    border-radius: var(--radius-md);
    transition: width 0.5s ease;
}

.question-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.question-card h4 {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
}

.option:hover {
    background: rgba(126, 200, 181, 0.08);
    border-color: rgba(126, 200, 181, 0.3);
}

.option input {
    margin-right: 0.75rem;
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-healing);
}

.option.selected {
    background: rgba(126, 200, 181, 0.15);
    border-color: var(--primary-healing);
    color: var(--primary-healing);
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.result-card .score {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-healing);
    margin: 1.25rem 0;
    line-height: 1;
}

.result-card .level {
    display: inline-block;
    padding: 0.625rem 1.75rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.level-green {
    background: rgba(126, 200, 181, 0.15);
    color: #38a169;
}

.level-yellow {
    background: rgba(245, 169, 98, 0.15);
    color: #d69e2e;
}

.level-orange {
    background: rgba(245, 100, 100, 0.15);
    color: #e53e3e;
}

.chat-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    max-width: 50rem;
    margin: 0 auto;
    border: 1px solid var(--border-light);
}

.chat-messages {
    height: 28rem;
    overflow-y: auto;
    padding: 1.25rem;
    background: linear-gradient(180deg, #f8faf9 0%, #f0f7f4 100%);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.message {
    margin-bottom: 1.25rem;
    display: flex;
    animation: fadeInUp 0.3s ease;
}

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

.message.user {
    justify-content: flex-end;
}

.message .bubble {
    max-width: 70%;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    line-height: 1.6;
    position: relative;
}

.message.bot .bubble {
    background: var(--bg-card);
    border-bottom-left-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
}

.message.user .bubble {
    background: linear-gradient(135deg, var(--primary-healing) 0%, var(--primary-calm) 100%);
    color: white;
    border-bottom-right-radius: 0.375rem;
}

.chat-input {
    display: flex;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
}

.chat-input input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1.5px solid var(--border-light);
    border-radius: 2rem;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-healing);
    box-shadow: 0 0 0 3px rgba(126, 200, 181, 0.1);
}

.chat-input button {
    padding: 0.875rem 1.75rem;
    border-radius: 2rem;
    font-weight: 500;
}

.data-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.data-table th,
.data-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: linear-gradient(135deg, rgba(126, 200, 181, 0.05) 0%, rgba(143, 185, 168, 0.03) 100%);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.data-table tr:hover {
    background: rgba(126, 200, 181, 0.03);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 5rem;
    margin-bottom: 1.25rem;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.tab:hover,
.tab.active {
    background: var(--primary-healing);
    border-color: var(--primary-healing);
    color: white;
}

.recommendation-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.recommendation-card h4 {
    color: var(--primary-healing);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.recommendation-card ul {
    list-style: none;
    padding: 0;
}

.recommendation-card li {
    padding: 0.625rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.recommendation-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary-healing);
    border-radius: 50%;
}

footer {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3rem;
}

footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

footer p::before {
    content: '🌿';
}

@media screen and (max-width: 48rem) {
    html {
        font-size: 14px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 0.75rem;
    }

    .nav-links {
        justify-content: center;
        gap: 0.25rem;
        padding: 0.5rem 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        flex-wrap: nowrap;
        max-width: 100%;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn,
    .btn-group input {
        width: 100%;
    }

    .chat-messages {
        height: 22rem;
    }

    .message .bubble {
        max-width: 85%;
        padding: 0.75rem 1rem;
    }

    .data-table {
        font-size: 0.875rem;
        overflow-x: auto;
        display: block;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .number {
        font-size: 2rem;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .tab {
        flex-shrink: 0;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }

    .result-card {
        padding: 1.5rem;
    }

    .result-card .score {
        font-size: 2.5rem;
    }

    .question-card {
        padding: 1.25rem;
    }

    .recommendation-card {
        padding: 1.25rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }
}

@media screen and (max-width: 30rem) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0.75rem;
    }

    .page-title h1 {
        font-size: 1.75rem;
    }

    .page-title p {
        font-size: 1rem;
    }

    .card-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.75rem;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.hidden {
    display: none !important;
}

.tips-section {
    margin-top: 2rem;
}

.tips-section .card {
    cursor: default;
}

.tips-section .card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.tips-section h3 {
    color: var(--primary-healing);
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.tips-section ul {
    list-style: none;
    padding: 0;
}

.tips-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tips-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-healing);
}