/**
 * Botanical 模板 - Styles
 * 绿植自然风：清新有机、禅意柔和
 */

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.tpl-botanical {
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
    background: linear-gradient(180deg, #faf7f0 0%, #f0ece0 30%, #e8e4d4 100%);
    color: var(--bark);
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
}

body.tpl-botanical::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(74,124,89,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 60%, rgba(139,154,107,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 85%, rgba(107,78,61,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   Vine Decorations (Top & Bottom)
   ========================================================================== */
.bt-vine-top, .bt-vine-bottom {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    position: relative;
    z-index: 1;
}

.bt-vine-top svg, .bt-vine-bottom svg {
    width: 100%;
    height: auto;
}

.bt-vine-bottom {
    margin-top: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.bt-header {
    background: linear-gradient(135deg, var(--leaf-dark) 0%, var(--leaf) 50%, var(--leaf-light) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(45,90,63,0.2);
}

.bt-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Brand */
.bt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.bt-brand-leaf {
    display: flex;
    align-items: center;
    color: var(--bloom);
    transition: transform 0.4s ease;
}

.bt-brand:hover .bt-brand-leaf {
    transform: rotate(-15deg) scale(1.1);
}

.bt-brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Navigation */
.bt-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bt-nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.bt-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.bt-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}

.bt-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--bloom);
    border-radius: 50%;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.bt-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Leaf Divider
   ========================================================================== */
.bt-leaf-divider {
    text-align: center;
    margin: 40px 0;
    color: var(--moss);
    font-size: 1.2rem;
    letter-spacing: 12px;
    opacity: 0.5;
}

/* ==========================================================================
   Converter Box
   ========================================================================== */
.converter-box {
    background: linear-gradient(145deg, #ffffff 0%, var(--cream) 100%);
    border: 1px solid rgba(139,154,107,0.15);
    border-radius: 20px;
    padding: 40px 32px;
    margin-bottom: 32px;
    box-shadow:
        0 4px 24px rgba(45,90,63,0.06),
        0 1px 3px rgba(107,78,61,0.04);
    position: relative;
    overflow: hidden;
}

.converter-box::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(74,124,89,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.converter-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--leaf-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.converter-title::before {
    content: '🌿';
    font-size: 1.3rem;
}

/* Converter Row */
.converter-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.converter-field {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.converter-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--earth);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.converter-field select,
.converter-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0dbcd;
    border-radius: 14px;
    font-size: 1rem;
    background: #fffdf9;
    color: var(--bark);
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.converter-field select:focus,
.converter-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74,124,89,0.08);
    background: #fff;
}

/* Swap Button */
.swap-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e0dbcd;
    background: #fffdf9;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.swap-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: rotate(180deg);
}

/* Rate Display */
.rate-display {
    margin-top: 28px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--dew) 0%, rgba(232,245,233,0.5) 100%);
    border-radius: 16px;
    border: 1px solid rgba(74,124,89,0.12);
    text-align: center;
}

.rate-display .rate-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--earth);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rate-display .rate-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--leaf-dark);
    margin-top: 4px;
}

.rate-display .rate-timestamp {
    font-size: 0.8rem;
    color: var(--earth-light);
    margin-top: 6px;
}

/* Result Box */
.result-box {
    background: linear-gradient(145deg, #ffffff, var(--cream));
    border: 1px solid rgba(139,154,107,0.12);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    text-align: center;
}

.result-box-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--earth);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-box-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--leaf-dark);
    margin-top: 4px;
    word-break: break-all;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: #fffdf9;
    border: 1px solid rgba(139,154,107,0.1);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 24px;
    transition: all 0.35s ease;
    box-shadow:
        0 2px 12px rgba(45,90,63,0.04),
        0 1px 2px rgba(107,78,61,0.03);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(74,124,89,0.04), transparent);
    transition: all 0.35s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(45,90,63,0.1),
        0 2px 8px rgba(107,78,61,0.06);
}

.card:hover::after {
    width: 120px;
    height: 120px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--leaf-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--leaf), var(--moss));
    border-radius: 2px;
}

/* ==========================================================================
   Pairs Grid
   ========================================================================== */
.pairs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.pair-item {
    background: #fffdf9;
    border: 1px solid rgba(139,154,107,0.12);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: var(--bark);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pair-item:hover {
    border-color: var(--leaf-light);
    box-shadow: 0 6px 20px rgba(45,90,63,0.1);
    transform: translateY(-2px);
}

.pair-item .pair-symbol {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.pair-item .pair-rate {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--leaf-dark);
}

.pair-item .pair-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.pair-item .pair-change.up { color: var(--primary); }
.pair-item .pair-change.down { color: #c0392b; }

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--moss);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--leaf-dark);
}

.breadcrumb span {
    color: var(--stone);
}

.breadcrumb .current {
    color: var(--leaf-dark);
    font-weight: 600;
}

/* ==========================================================================
   Search Box
   ========================================================================== */
.search-box {
    margin-bottom: 24px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e0dbcd;
    border-radius: 30px;
    font-size: 1rem;
    background: #fffdf9;
    color: var(--bark);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-box input:focus {
    border-color: var(--leaf);
    box-shadow: 0 0 0 5px rgba(74,124,89,0.07);
    background: #fff;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.pagination a {
    background: #fffdf9;
    color: var(--earth);
    border: 1px solid #e0dbcd;
}

.pagination a:hover {
    border-color: var(--leaf);
    color: var(--leaf-dark);
    background: var(--dew);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
}

.pagination .disabled {
    color: var(--stone);
    background: transparent;
    border-color: transparent;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--leaf-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(45,90,63,0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(45,90,63,0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #fffdf9;
    color: var(--leaf-dark);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-soft);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* ==========================================================================
   Badge
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-primary {
    background: var(--dew);
    color: var(--leaf-dark);
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff8e1;
    color: #f57f17;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

/* ==========================================================================
   Form Group
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--earth);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0dbcd;
    border-radius: 14px;
    font-size: 0.95rem;
    background: #fffdf9;
    color: var(--bark);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--leaf);
    box-shadow: 0 0 0 4px rgba(74,124,89,0.07);
}

/* ==========================================================================
   Alert
   ========================================================================== */
.alert {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 0.92rem;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #1b5e20;
    border: 1px solid rgba(139,154,107,0.2);
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #e65100;
    border: 1px solid rgba(214,148,64,0.2);
}

.alert-error {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #b71c1c;
    border: 1px solid rgba(229,115,115,0.2);
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: #f0ece0;
    padding: 6px;
    border-radius: 20px;
    overflow-x: auto;
}

.tabs button,
.tabs a {
    padding: 10px 24px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--earth);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tabs .active,
.tabs button.active,
.tabs a.active {
    background: #fffdf9;
    color: var(--leaf-dark);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(45,90,63,0.12);
}

.tabs button:hover:not(.active),
.tabs a:hover:not(.active) {
    color: var(--leaf);
}

/* ==========================================================================
   Spinner
   ========================================================================== */
.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(74,124,89,0.15);
    border-top-color: var(--leaf);
    border-radius: 50%;
    animation: bt-spin 0.7s linear infinite;
}

@keyframes bt-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ==========================================================================
   SEO Content Area
   ========================================================================== */
.bt-content {
    margin-top: 48px;
}

.bt-article {
    background: #fffdf9;
    border: 1px solid rgba(139,154,107,0.1);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.bt-article::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--leaf), var(--moss));
    border-radius: 0 2px 2px 0;
}

.bt-article:hover {
    box-shadow: 0 8px 28px rgba(45,90,63,0.1);
    transform: translateY(-2px);
}

.bt-art-leaf {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 12px;
}

.bt-article h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--leaf-dark);
    margin-bottom: 12px;
}

.bt-article p {
    font-size: 0.95rem;
    color: var(--bark);
    line-height: 1.8;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.bt-footer {
    background: linear-gradient(160deg, var(--bark) 0%, #2d2420 100%);
    color: #c8bfb0;
    padding: 48px 24px 24px;
    position: relative;
    z-index: 1;
}

.bt-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--leaf), var(--moss), var(--bloom), var(--moss), var(--leaf));
    opacity: 0.7;
}

.bt-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.bt-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.bt-fcol {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bt-fcol-icon {
    display: flex;
    align-items: center;
    color: var(--moss);
}

.bt-fcol-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.bt-fcol p {
    font-size: 0.88rem;
    color: #a89880;
    line-height: 1.7;
}

.bt-fcol-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--moss);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.bt-fcol a {
    color: #c8bfb0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.25s ease;
    padding: 2px 0;
}

.bt-fcol a:hover {
    color: var(--sprout);
}

.bt-footer-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(200,191,176,0.12);
    font-size: 0.82rem;
    color: #a89880;
}

.bt-dot {
    color: var(--moss);
}

.bt-footer-signature {
    margin-top: 16px;
    font-size: 0.88rem;
    color: var(--moss);
    font-style: italic;
    text-align: center;
}

.bt-footer-signature::before,
.bt-footer-signature::after {
    content: ' ~ ';
    color: #a89880;
}

/* ==========================================================================
   Decorative Floating Leaves (CSS-only)
   ========================================================================== */
.bt-main::before,
.bt-main::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}

.bt-main::before {
    top: 20%;
    right: 5%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--leaf) 0%, transparent 70%);
    border-radius: 0 100px 100px 100px;
    transform: rotate(-30deg);
}

.bt-main::after {
    bottom: 15%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--moss) 0%, transparent 70%);
    border-radius: 100px 0 100px 100px;
    transform: rotate(20deg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .bt-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 16px;
    }

    .bt-nav {
        gap: 2px;
    }

    .bt-nav a {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .bt-main {
        padding: 20px 12px 32px;
    }

    .converter-box {
        padding: 24px 16px;
    }

    .converter-row {
        flex-direction: column;
    }

    .swap-btn {
        align-self: center;
    }

    .pairs-grid {
        grid-template-columns: 1fr;
    }

    .bt-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .bt-article {
        padding: 20px 16px;
    }

    .tabs {
        gap: 2px;
    }

    .tabs button,
    .tabs a {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
}

@media (max-width: 600px) {
    .bt-brand-name {
        font-size: 1.15rem;
    }

    .converter-title {
        font-size: 1.3rem;
    }

    .rate-display .rate-value {
        font-size: 1.4rem;
    }

    .result-box-value {
        font-size: 1.5rem;
    }

    .card {
        padding: 18px 14px;
    }

    .bt-article h2 {
        font-size: 1.1rem;
    }
}
