/* ============================================================
   Components ?按钮、卡片、表单、Modal、Tag、价格、动?   魔力指数设计风格 ?rounded-xl、渐变图标、悬停上?   ============================================================ */

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--t-base);
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.btn:hover { transform: none; }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--primary-700);
    color: var(--white);
    border-color: var(--primary-700);
    box-shadow: 0 1px 2px 0 rgba(13, 148, 136, 0.05);
}
.btn-primary:hover {
    background: var(--primary-800);
    border-color: var(--primary-800);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-ink {
    background: var(--gray-900);
    color: var(--white);
    border-color: var(--gray-900);
}
.btn-ink:hover { background: var(--gray-800); color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--gray-800);
    border-color: var(--gray-200);
}
.btn-outline:hover {
    background: var(--bg-light);
    color: var(--primary-700);
    border-color: var(--primary-200);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-light);
    color: var(--primary-700);
}

.btn-white {
    background: var(--white);
    color: var(--primary-700);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-glow);
}
.btn-white:hover {
    background: var(--bg-light);
    color: var(--primary-700);
    border-color: var(--white);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.btn-lg { padding: 14px 32px; font-size: 1rem; height: 48px; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }

/* ============================================================
   Section Badge (小徽?
   ============================================================ */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    background: var(--white);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
}
.section-badge::before {
    content: '?;
    color: var(--primary-500);
}
.section-badge.is-light {
    background: var(--white);
    color: var(--primary-700);
    border-color: var(--primary-200);
}
.section-badge.is-dark {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
}
.section-badge.is-dark::before { color: var(--white); }

/* ============================================================
   Icon Chip (渐变图标方块)
   ============================================================ */
.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-100), var(--bg-light));
    color: var(--primary-700);
    flex-shrink: 0;
    transition: all var(--t-base);
}
.icon-chip svg { width: 20px; height: 20px; }
.icon-chip.is-sm { width: 32px; height: 32px; }
.icon-chip.is-sm svg { width: 16px; height: 16px; }
.icon-chip.is-lg { width: 56px; height: 56px; border-radius: var(--radius-lg); }
.icon-chip.is-lg svg { width: 28px; height: 28px; }
.icon-chip.is-xl { width: 80px; height: 80px; border-radius: var(--radius-lg); }
.icon-chip.is-xl svg { width: 36px; height: 36px; }

/* 彩色渐变 chip 变体（用?6 步骤图标?*/
.icon-chip.v-cyan-blue   { background: linear-gradient(135deg, #CFFAFE, #DBEAFE); color: #0891B2; }
.icon-chip.v-orange-red  { background: linear-gradient(135deg, #FED7AA, #FECACA); color: #EA580C; }
.icon-chip.v-emerald-teal{ background: linear-gradient(135deg, #D1FAE5, #CCFBF1); color: #059669; }
.icon-chip.v-indigo-purple { background: linear-gradient(135deg, #E0E7FF, #EDE9FE); color: var(--primary-600); }
.icon-chip.v-violet-purple { background: linear-gradient(135deg, #DDD6FE, #FBCFE8); color: #7C3AED; }
.icon-chip.v-yellow-orange { background: linear-gradient(135deg, #FEF3C7, #FED7AA); color: #D97706; }

/* ============================================================
   Cards (魔力指数风：border + shadow + hover lift)
   ============================================================ */
.card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all var(--t-base);
    position: relative;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-100);
}
.card.is-flat { box-shadow: none; border: 1px solid var(--gray-100); }
.card.is-flat:hover { box-shadow: var(--shadow); }

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.card-text {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ============================================================
   Form
   ============================================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    color: var(--gray-800);
    transition: all var(--t-fast);
    outline: none;
    font-family: var(--font-sans);
}
.form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:read-only {
    background: var(--gray-50);
    color: var(--gray-600);
}
textarea.form-control {
    min-height: 96px;
    resize: vertical;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--danger);
    background: var(--danger-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
}
.form-error::before {
    content: '!';
    font-weight: 700;
}
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--gray-500);
}
.form-success {
    background: var(--success-light);
    border-left: 3px solid var(--success);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    color: #065F46;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-overlay.is-active { display: flex; }

.modal {
    background: var(--white);
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
}
.modal-header .kicker {
    font-size: 0.75rem;
    color: var(--primary-700);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}
.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding-right: 32px;
    color: var(--gray-800);
    line-height: 1.3;
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border: none;
    color: var(--gray-500);
    font-size: 1.125rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
    border-radius: var(--radius);
    cursor: pointer;
}
.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}
.modal-body { padding: 24px 28px 28px; }

/* ============================================================
   Tags / Pills
   ============================================================ */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
    line-height: 1.4;
}
.tag-red    { background: var(--danger-light); color: #991B1B; border-color: #FECACA; }
.tag-yellow { background: var(--warning-light); color: #92400E; border-color: #FDE68A; }
.tag-green  { background: var(--success-light); color: #065F46; border-color: #A7F3D0; }
.tag-bronze { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-200); }
.tag-ink    { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-200); }
.tag-soft   { background: var(--white); color: var(--gray-600); border: 1px solid var(--gray-200); }

/* ============================================================
   Tables
   ============================================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.875rem;
}
.table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.table tr:hover td { background: var(--gray-50); }

/* ============================================================
   Bar / Progress
   ============================================================ */
.bar-track {
    height: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 6px;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-700), var(--primary-500));
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}
.bar-fill.is-ok   { background: linear-gradient(90deg, #059669, #10B981); }
.bar-fill.is-warn { background: linear-gradient(90deg, #D97706, #F59E0B); }
.bar-fill.is-low  { background: linear-gradient(90deg, #DC2626, #EF4444); }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out both; }
.animate-fade-in-up-delay-1 { animation: fadeInUp 0.6s ease-out 0.1s both; }
.animate-fade-in-up-delay-2 { animation: fadeInUp 0.6s ease-out 0.2s both; }
.animate-fade-in-up-delay-3 { animation: fadeInUp 0.6s ease-out 0.3s both; }
.animate-fade-in-up-delay-4 { animation: fadeInUp 0.6s ease-out 0.4s both; }

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 30s linear infinite; }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(20px, -30px) scale(1.05); }
}
.animate-particle-float { animation: particleFloat 8s ease-in-out infinite; }

@keyframes particleDrift {
    0%   { transform: translate(0, 0); opacity: 0.5; }
    50%  { transform: translate(-20px, 25px); opacity: 0.8; }
    100% { transform: translate(0, 0); opacity: 0.5; }
}
.animate-particle-drift { animation: particleDrift 14s ease-in-out infinite; }

@keyframes particleTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%      { opacity: 1; transform: scale(1.2); }
}
.animate-particle-twinkle { animation: particleTwinkle 3s ease-in-out infinite; }

@keyframes particleGlitter {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.7; }
}
.animate-particle-glitter { animation: particleGlitter 2s ease-in-out infinite; }

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }

/* 列表点（魔力指数?›） */
.bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bullet-list li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-size: 0.9375rem;
    color: var(--gray-700);
    line-height: 1.7;
}
.bullet-list li::before {
    content: '?;
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--primary-700);
    font-weight: 700;
    font-size: 1.1em;
}
.bullet-check li::before { content: '?; color: var(--success); }
