/*
 * ══════════════════════════════════════════════════════════════
 *  LIGHT THEME — BYstock
 *  Active when: html does NOT have class "theme-dark"
 *  Selector pattern: html:not(.theme-dark)
 * ══════════════════════════════════════════════════════════════
 *
 *  Structure:
 *  1. Variables
 *  2. Background & texture
 *  3. Header
 *  4. Footer
 *  5. Cards & panels (all pages)
 *  6. Calculator
 *  7. Table
 *  8. Buttons & icons
 *  9. Typography
 * 10. Chat widget
 * 11. Homepage specifics (body.page-home)
 * 12. Responsive
 * ══════════════════════════════════════════════════════════════
 */

/* ── 1. Variables ────────────────────────────────────────────── */
html:not(.theme-dark) body {
    --lt-bg-1:        #f5f9ff;
    --lt-bg-2:        #eaf3ff;
    --lt-bg-3:        #f8fbff;
    --lt-text:        #0f1e33;
    --lt-muted:       #4a6080;
    --lt-card:        rgba(255, 255, 255, 0.95);
    --lt-card-2:      rgba(255, 255, 255, 0.95);
    --lt-border:      rgba(37, 99, 235, 0.15);
    --lt-shadow:      0 8px 32px rgba(30, 80, 160, 0.08);
    --lt-shadow-h:    0 20px 48px rgba(30, 80, 160, 0.14);
    --lt-purple:      #1d4ed8;
    --lt-purple-h:    #2563eb;

    /* Override base dark theme CSS variables for light mode */
    --card-bg:        rgba(255, 255, 255, 0.95);
    --dark-bg:        rgba(240, 248, 255, 0.90);
    --darker-bg:      #1d4ed8;
    --text-color:     #0f1e33;
    --text-secondary: #4a6080;
    --border-color:   rgba(37, 99, 235, 0.15);
}

/* ── 2. Background — один градиент + scroll (Safari не тянет fixed + кучу слоёв) ─────────────────────────────────── */
html:not(.theme-dark) body {
    color: var(--lt-text) !important;
    background: linear-gradient(180deg, var(--lt-bg-1) 0%, var(--lt-bg-2) 45%, var(--lt-bg-3) 100%) !important;
    background-attachment: scroll !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* Сетку не рисуем — лишний fixed-слой глючит в Safari */
html:not(.theme-dark) body::before {
    content: none !important;
    display: none !important;
}

/* ── 3. Header — без blur (из styles.css), иначе Safari лагает при скролле ───────────────────────────────────────────────── */
html:not(.theme-dark) header {
    background: linear-gradient(135deg, #4f2fd4 0%, #6b44f0 45%, #5e3be8 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 24px rgba(79, 47, 212, 0.22) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html:not(.theme-dark) nav ul li a {
    color: rgba(255, 255, 255, 0.92) !important;
}

html:not(.theme-dark) nav ul li a:hover {
    color: #fff !important;
}

html:not(.theme-dark) nav ul li a::after {
    background: rgba(255, 255, 255, 0.95) !important;
}

html:not(.theme-dark) .language-selector select,
html:not(.theme-dark) .theme-toggle-btn {
    border-radius: 50% !important;
}

html:not(.theme-dark) .language-selector select {
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

html:not(.theme-dark) .theme-toggle-btn {
    border-color: rgba(109, 76, 255, 0.35) !important;
    color: #4f2fd4 !important;
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 2px 6px rgba(79, 47, 212, 0.15) !important;
}

html:not(.theme-dark) .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 12px rgba(79, 47, 212, 0.25) !important;
}

/* ── 4. Footer — без blur (Safari) ───────────────────────────────────────────────── */
html:not(.theme-dark) footer {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid var(--lt-border) !important;
}

html:not(.theme-dark) .footer-col h4,
html:not(.theme-dark) .footer-logo,
html:not(.theme-dark) .footer-logo a {
    color: #2d2540 !important;
}

html:not(.theme-dark) .footer-col ul li a,
html:not(.theme-dark) .footer-bottom {
    color: var(--lt-muted) !important;
}

html:not(.theme-dark) .tor-access-bar {
    color: #16122a !important;
}

html:not(.theme-dark) .tor-access-link {
    color: #1a56db !important;
}

/* ── 5. Cards & panels — без backdrop-filter (Safari композитор не тянет) ───────────────────────────────────────── */
html:not(.theme-dark) .exchange-widget,
html:not(.theme-dark) .transactions-table-container,
html:not(.theme-dark) .advantage-card,
html:not(.theme-dark) .step,
html:not(.theme-dark) .faq-item,
html:not(.theme-dark) .about-content,
html:not(.theme-dark) .terms-content,
html:not(.theme-dark) .privacy-content,
html:not(.theme-dark) .stat-item,
html:not(.theme-dark) .exchange-summary,
html:not(.theme-dark) .deposit-info,
html:not(.theme-dark) .deposit-address,
html:not(.theme-dark) .transaction-details,
html:not(.theme-dark) .network-info {
    background: var(--lt-card) !important;
    border: 1px solid var(--lt-border) !important;
    box-shadow: var(--lt-shadow) !important;
    border-radius: 20px !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

html:not(.theme-dark) .advantage-card:hover,
html:not(.theme-dark) .step:hover,
html:not(.theme-dark) .faq-item:hover,
html:not(.theme-dark) .stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--lt-shadow-h) !important;
}

/* ── 6. Calculator ───────────────────────────────────────────── */
html:not(.theme-dark) .exchange-widget {
    max-width: 480px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 24px !important;
    padding: 1.5rem !important;
    background: #ffffff !important;
    box-shadow:
        0 2px 0 rgba(37, 99, 235, 0.08),
        0 8px 24px rgba(30, 80, 160, 0.08),
        0 24px 64px rgba(30, 80, 160, 0.10),
        0 0 0 1px rgba(37, 99, 235, 0.10) !important;
}

/* Только фон/рамка — padding и раскладка только из styles.css (как в тёмной теме) */
html:not(.theme-dark) .exchange-row {
    background: #f0f6ff !important;
    border: 1.5px solid rgba(37, 99, 235, 0.14) !important;
    border-radius: 16px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

html:not(.theme-dark) .exchange-row:hover {
    border-color: rgba(37, 99, 235, 0.32) !important;
    box-shadow: 0 4px 16px rgba(30, 80, 200, 0.08) !important;
}

html:not(.theme-dark) .exchange-row:first-of-type {
    border-bottom: 1.5px solid rgba(37, 99, 235, 0.14) !important;
}

html:not(.theme-dark) .exchange-details {
    background: #eaf3ff !important;
    border: 1px solid rgba(37, 99, 235, 0.12) !important;
    border-radius: 14px !important;
}

html:not(.theme-dark) .network-selector {
    background: #f0f6ff !important;
    border: 1px solid rgba(37, 99, 235, 0.14) !important;
    border-radius: 14px !important;
}

/* Switch coins button */
html:not(.theme-dark) .switch-coins button,
html:not(.theme-dark) .switch-direction-button {
    background: linear-gradient(135deg, #6b44f0 0%, #4f2fd4 100%) !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 14px rgba(79, 47, 212, 0.35) !important;
    color: #ffffff !important;
    width: 42px !important;
    height: 42px !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

html:not(.theme-dark) .switch-coins button:hover,
html:not(.theme-dark) .switch-direction-button:hover {
    box-shadow: 0 6px 20px rgba(79, 47, 212, 0.50) !important;
    transform: rotate(180deg) scale(1.08) !important;
}

/* ── Exchange Summary (exchange.html step 2) ────────────────── */
html:not(.theme-dark) body .exchange-form .exchange-summary,
html:not(.theme-dark) body .exchange-summary.mt-3,
html:not(.theme-dark) .exchange-summary {
    background: linear-gradient(180deg, #f3f8ff 0%, #ebf4ff 100%) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.14) !important;
    border-radius: 20px !important;
    padding: 1.4rem !important;
    margin-top: 0.5rem !important;
    box-shadow: 0 4px 20px rgba(30, 80, 160, 0.07) !important;
    position: relative;
    overflow: hidden;
}

/* Blue accent line at top */
html:not(.theme-dark) .exchange-summary::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%);
}

html:not(.theme-dark) .exchange-summary h3 {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--lt-muted) !important;
    margin: 0 0 1rem 0 !important;
}

/* Rows — polish only visible items, never override display:none */
html:not(.theme-dark) .summary-item:not([style*="display: none"]):not([style*="display:none"]) {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

html:not(.theme-dark) .summary-item:last-child {
    margin-bottom: 0 !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(37, 99, 235, 0.10) !important;
    font-weight: inherit !important;
}

/* Label (left side) */
html:not(.theme-dark) .summary-item > span:first-child {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    color: var(--lt-muted) !important;
    text-transform: uppercase !important;
    white-space: nowrap;
}

/* Value (right side) */
html:not(.theme-dark) .summary-item > span:last-child {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #16122a !important;
    letter-spacing: -0.01em !important;
    text-align: right;
}

/* Exchange Rate value — blue accent */
html:not(.theme-dark) .summary-item:last-child > span:last-child {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #1d4ed8 !important;
}

/* Exchange steps (progress bar on exchange.html) */
html:not(.theme-dark) .step-title {
    color: #3d3560 !important;
    font-weight: 500;
}

html:not(.theme-dark) .exchange-step.active .step-title {
    color: #16122a !important;
    font-weight: 700 !important;
}

html:not(.theme-dark) .exchange-step.completed .step-title {
    color: #1d4ed8 !important;
}

html:not(.theme-dark) .step-number {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(37, 99, 235, 0.30) !important;
    color: #4a6080 !important;
}

html:not(.theme-dark) .exchange-step.active .step-number {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

html:not(.theme-dark) .exchange-step.completed .step-number {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}

html:not(.theme-dark) .step-progress {
    background-color: rgba(37, 99, 235, 0.15) !important;
}

html:not(.theme-dark) .step-progress-fill {
    background-color: #1d4ed8 !important;
}

/* Раскладка строк калькулятора — как в тёмной теме, из styles.css (без переопределений). */

html:not(.theme-dark) .coin-label,
html:not(.theme-dark) .detail-label,
html:not(.theme-dark) .amount-usd,
html:not(.theme-dark) .network-label {
    color: var(--lt-muted) !important;
}

html:not(.theme-dark) .detail-value,
html:not(.theme-dark) .amount-input input,
html:not(.theme-dark) .coin-selector select,
html:not(.theme-dark) .custom-select-button,
html:not(.theme-dark) .custom-select-button span,
html:not(.theme-dark) .custom-select-option span,
html:not(.theme-dark) #from-coin,
html:not(.theme-dark) #to-coin {
    color: var(--lt-text) !important;
}

html:not(.theme-dark) .amount-input input {
    font-weight: 700;
    letter-spacing: 0.01em;
}

html:not(.theme-dark) .custom-select-button {
    border-radius: 12px !important;
}

html:not(.theme-dark) .custom-select-options,
html:not(.theme-dark) .coin-selector select option {
    /* Та же прозрачность, что и в тёмной теме: 0.28 */
    background: rgba(255, 255, 255, 0.28) !important;
    color: var(--lt-text) !important;
    border: 1px solid rgba(124, 98, 213, 0.22) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 24px rgba(30, 80, 160, 0.08) !important;
}

/* ── 7. Table ────────────────────────────────────────────────── */
html:not(.theme-dark) .transactions-table {
    border-collapse: separate;
    border-spacing: 0;
}

html:not(.theme-dark) .transactions-table th {
    background: rgba(237, 230, 255, 0.9) !important;
    color: #16122a !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
}

html:not(.theme-dark) .transactions-table td {
    color: #16122a !important;
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
}

/* Таблица последних транзакций — чёрный текст в светлой теме (десктоп и мобиле) */
html:not(.theme-dark) .transactions-table-container .recent-tx-date,
html:not(.theme-dark) .transactions-table-container .recent-tx-amount,
html:not(.theme-dark) .transactions-table-container .recent-tx-arrow,
html:not(.theme-dark) .transactions-table .recent-tx-date,
html:not(.theme-dark) .transactions-table .recent-tx-amount,
html:not(.theme-dark) .transactions-table .recent-tx-arrow {
    color: var(--lt-muted) !important;
}

/* ── 8. Buttons & icons ──────────────────────────────────────── */
html:not(.theme-dark) .exchange-button,
html:not(.theme-dark) .btn-primary {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff !important;
    border-radius: 14px !important;
    min-height: 52px;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.42),
                inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}

html:not(.theme-dark) .exchange-button:hover,
html:not(.theme-dark) .btn-primary:hover {
    background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%) !important;
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.50),
                inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px);
    filter: saturate(1.05);
}

html:not(.theme-dark) .exchange-button:active,
html:not(.theme-dark) .btn-primary:active {
    transform: translateY(0);
}

html:not(.theme-dark) .step-icon,
html:not(.theme-dark) .advantage-icon,
html:not(.theme-dark) .step-icon i,
html:not(.theme-dark) .advantage-icon i {
    color: #ffffff !important;
}

/* ── 9. Typography ───────────────────────────────────────────── */
html:not(.theme-dark) h1,
html:not(.theme-dark) h2,
html:not(.theme-dark) h3 {
    color: var(--lt-text) !important;
}

html:not(.theme-dark) .faq-question {
    font-weight: 700 !important;
    letter-spacing: 0.005em;
    color: var(--lt-text) !important;
}

html:not(.theme-dark) .faq-answer,
html:not(.theme-dark) .about-text p,
html:not(.theme-dark) .terms-content p,
html:not(.theme-dark) .privacy-content p {
    color: #4a4260 !important;
    line-height: 1.72 !important;
}

html:not(.theme-dark) .terms-content h2,
html:not(.theme-dark) .terms-content h3,
html:not(.theme-dark) .privacy-content h2,
html:not(.theme-dark) .privacy-content h3 {
    color: var(--lt-text) !important;
}

html:not(.theme-dark) .completed-content h1,
html:not(.theme-dark) .coin-symbol,
html:not(.theme-dark) .coin-amount,
html:not(.theme-dark) .info-row span:last-child,
html:not(.theme-dark) .address-text,
html:not(.theme-dark) .hash-text,
html:not(.theme-dark) .transaction-info h3,
html:not(.theme-dark) #completion-time-value {
    color: #16122a !important;
}

html:not(.theme-dark) .transaction-details,
html:not(.theme-dark) .transaction-details .transaction-info {
    background: linear-gradient(180deg, #f3f8ff 0%, #ebf4ff 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.14) !important;
    border-radius: 18px !important;
    padding: 1.35rem !important;
    box-shadow: 0 4px 20px rgba(30, 80, 160, 0.07) !important;
}

html:not(.theme-dark) .transaction-details .hash-text {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(37, 99, 235, 0.12) !important;
}

html:not(.theme-dark) .transaction-details .btn-outline {
    background: rgba(255, 255, 255, 0.68) !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}

html:not(.theme-dark) .transaction-details .btn-outline:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
}

html:not(.theme-dark) nav ul li a,
html:not(.theme-dark) .logo {
    letter-spacing: 0.01em;
}

/* ── 10. Chat widget ─────────────────────────────────────────── */
html:not(.theme-dark) .chat-widget {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(109, 76, 255, 0.20) !important;
    box-shadow: 0 16px 48px rgba(88, 60, 160, 0.16) !important;
    border-radius: 20px !important;
}

html:not(.theme-dark) .chat-header {
    background: linear-gradient(135deg, #4f2fd4 0%, #6b44f0 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px 20px 0 0 !important;
}

html:not(.theme-dark) .chat-header h3,
html:not(.theme-dark) .chat-header * {
    color: #ffffff !important;
}

html:not(.theme-dark) .chat-messages {
    background: rgba(250, 247, 255, 0.80) !important;
}

html:not(.theme-dark) .chat-input {
    background: rgba(255, 255, 255, 0.96) !important;
    border-top: 1px solid rgba(109, 76, 255, 0.14) !important;
    border-radius: 0 0 20px 20px !important;
}

html:not(.theme-dark) .chat-input input {
    background: rgba(246, 242, 255, 0.80) !important;
    border: 1px solid rgba(109, 76, 255, 0.22) !important;
    color: var(--lt-text) !important;
    border-radius: 12px !important;
}

html:not(.theme-dark) .chat-input input:focus {
    border-color: rgba(109, 76, 255, 0.50) !important;
    box-shadow: 0 0 0 3px rgba(109, 76, 255, 0.12) !important;
}

html:not(.theme-dark) .chat-input input::placeholder {
    color: var(--lt-muted) !important;
}

/* Кнопка отправки в чате — круглая везде (как в тёмной теме); селектор по id перебивает инжект из chat-module.js */
html:not(.theme-dark) .chat-input button,
html:not(.theme-dark) .chat-input #send-message {
    background: linear-gradient(135deg, #6b44f0, #5028d9) !important;
    color: #fff !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    box-shadow: 0 4px 12px rgba(93, 61, 217, 0.28) !important;
}

html:not(.theme-dark) .chat-input button:hover {
    background: linear-gradient(135deg, #7d55f5, #6038e8) !important;
    box-shadow: 0 6px 16px rgba(93, 61, 217, 0.36) !important;
}

html:not(.theme-dark) .operator-message {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(59, 130, 246, 0.88)) !important;
    color: var(--lt-text) !important; /* админ в светлой теме — чёрный текст */
    border-radius: 16px 16px 16px 4px !important;
}

html:not(.theme-dark) .operator-message .chat-message-time {
    color: rgba(15, 30, 51, 0.72) !important;
}

html:not(.theme-dark) .user-message {
    background: rgba(219, 234, 254, 0.92) !important;
    color: var(--lt-text) !important;
    border-radius: 16px 16px 4px 16px !important;
}

html:not(.theme-dark) .user-message .chat-message-time {
    color: var(--lt-muted) !important;
}

html:not(.theme-dark) .typing-indicator {
    background: rgba(219, 234, 254, 0.92) !important;
}

html:not(.theme-dark) .chat-widget-button {
    background: linear-gradient(135deg, #6b44f0, #4f2fd4) !important;
    box-shadow: 0 8px 24px rgba(79, 47, 212, 0.36) !important;
    border-radius: 50% !important;
}

html:not(.theme-dark) .chat-widget-button:hover {
    background: linear-gradient(135deg, #7d55f5, #6038e8) !important;
}

/* Chat footer "Powered by BYstock Team" */
html:not(.theme-dark) .chat-footer {
    background: rgba(248, 246, 255, 0.90) !important;
    border-top: 1px solid rgba(109, 76, 255, 0.10) !important;
}

/* Мобильная: низ чата (окно вокруг формы ввода) — светло-синий как фон светлой темы */
@media (max-width: 768px) {
    html:not(.theme-dark) .chat-widget.active .chat-input {
        background: linear-gradient(180deg, #eaf3ff 0%, #f0f6ff 50%, #f5f9ff 100%) !important;
        border-top: 1px solid rgba(37, 99, 235, 0.14) !important;
    }
    html:not(.theme-dark) .chat-widget.active .chat-input input:focus {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}

html:not(.theme-dark) .chat-powered-by {
    background: linear-gradient(90deg, #0d2d6b 0%, #1a56db 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    opacity: 1 !important;
}

/* Чат в светлой теме без blur — иначе Safari лагает */
html:not(.theme-dark) .chat-widget,
html:not(.theme-dark) .chat-header,
html:not(.theme-dark) .chat-input,
html:not(.theme-dark) .chat-input input,
html:not(.theme-dark) .chat-widget-button,
html:not(.theme-dark) .chat-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ── 11. Homepage specifics (body.page-home) ─────────────────── */
html:not(.theme-dark) body.page-home {
    position: relative;
}

/* Без fixed vignette — лишний слой в Safari даёт лаги */
html:not(.theme-dark) body.page-home .colorful-pattern,
html:not(.theme-dark) body.page-home #particles-background {
    opacity: 0.12;
}

/* Hero */
html:not(.theme-dark) body.page-home .hero {
    padding-top: 2.5rem !important;
    padding-bottom: 3rem !important;
    text-align: center !important;
}

html:not(.theme-dark) body.page-home .hero .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

html:not(.theme-dark) body.page-home .hero h1 {
    font-size: clamp(2rem, 4.2vw, 2.75rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.06 !important;
    margin-bottom: 0.5em !important;
    width: 100%;
}

html:not(.theme-dark) body.page-home .hero p {
    font-size: 1.08rem;
    line-height: 1.68;
    max-width: 52ch;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 2rem !important;
    color: var(--lt-muted) !important;
}

html:not(.theme-dark) body.page-home .recent-transactions p,
html:not(.theme-dark) body.page-home .no-transactions {
    color: var(--lt-muted) !important;
}

html:not(.theme-dark) body.page-home main .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Scroll animations use global IntersectionObserver logic from styles.css */

/* Эффект плавного появления при прокрутке в светлой теме */
html:not(.theme-dark) .scroll-fade-in,
html:not(.theme-dark) .scroll-slide-up,
html:not(.theme-dark) .scroll-fade-left,
html:not(.theme-dark) .scroll-fade-right {
    opacity: 0 !important;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}
html:not(.theme-dark) .scroll-fade-in {
    transform: translateY(30px) translateZ(0);
    -webkit-transform: translateY(30px) translateZ(0);
}
html:not(.theme-dark) .scroll-slide-up {
    transform: translateY(50px) translateZ(0);
    -webkit-transform: translateY(50px) translateZ(0);
}
html:not(.theme-dark) .scroll-fade-left {
    transform: translateX(-30px) translateZ(0);
    -webkit-transform: translateX(-30px) translateZ(0);
}
html:not(.theme-dark) .scroll-fade-right {
    transform: translateX(30px) translateZ(0);
    -webkit-transform: translateX(30px) translateZ(0);
}
html:not(.theme-dark) .scroll-fade-in.visible,
html:not(.theme-dark) .scroll-slide-up.visible,
html:not(.theme-dark) .scroll-fade-left.visible,
html:not(.theme-dark) .scroll-fade-right.visible {
    opacity: 1 !important;
}
html:not(.theme-dark) .scroll-fade-in.visible {
    transform: translateY(0) translateZ(0);
    -webkit-transform: translateY(0) translateZ(0);
}
html:not(.theme-dark) .scroll-slide-up.visible {
    transform: translateY(0) translateZ(0);
    -webkit-transform: translateY(0) translateZ(0);
}
html:not(.theme-dark) .scroll-fade-left.visible {
    transform: translateX(0) translateZ(0);
    -webkit-transform: translateX(0) translateZ(0);
}
html:not(.theme-dark) .scroll-fade-right.visible {
    transform: translateX(0) translateZ(0);
    -webkit-transform: translateX(0) translateZ(0);
}

/* Hover lift */
html:not(.theme-dark) body.page-home .advantage-card,
html:not(.theme-dark) body.page-home .step,
html:not(.theme-dark) body.page-home .faq-item,
html:not(.theme-dark) body.page-home .stat-item {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease !important;
}

html:not(.theme-dark) body.page-home .advantage-card:hover,
html:not(.theme-dark) body.page-home .step:hover {
    transform: translateY(-4px) !important;
}

/* ── 12. Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    html:not(.theme-dark) body {
        background-attachment: scroll !important;
    }

    /* Плавное появление при прокрутке — мобильная */
    html:not(.theme-dark) .scroll-fade-in,
    html:not(.theme-dark) .scroll-slide-up,
    html:not(.theme-dark) .scroll-fade-left,
    html:not(.theme-dark) .scroll-fade-right {
        transition-duration: 0.45s !important;
        transition-timing-function: ease-out !important;
    }

    /* Калькулятор на главной: адаптивный под экран (max-width 100%), в ТГ уже — только в styles.css по .in-telegram */
    html:not(.theme-dark) .exchange-widget {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    html:not(.theme-dark) body.page-home .exchange-widget {
        padding: 0.85rem !important;
    }

    /* Раскладку калькулятора не трогаем — как в тёмной теме, только из styles.css (flex + padding-top). Иначе в Telegram сбивается. */

    html:not(.theme-dark) .exchange-button,
    html:not(.theme-dark) .btn-primary {
        min-height: 50px;
    }

    html:not(.theme-dark) body.page-home {
        font-size: 15px !important;
    }

    html:not(.theme-dark) body.page-home main .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    html:not(.theme-dark) body.page-home section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    html:not(.theme-dark) body.page-home .hero {
        padding-top: 1.7rem !important;
        padding-bottom: 1.9rem !important;
    }

    html:not(.theme-dark) body.page-home .hero h1 {
        font-size: 1.72rem !important;
        line-height: 1.08 !important;
        letter-spacing: -0.025em !important;
    }

    html:not(.theme-dark) body.page-home .hero p {
        font-size: 0.96rem !important;
        line-height: 1.52 !important;
        margin-bottom: 1.25rem !important;
        max-width: 46ch !important;
    }

    html:not(.theme-dark) body.page-home .transactions-table-container {
        border-radius: 18px !important;
    }

    html:not(.theme-dark) body.page-home .transactions-table {
        font-size: 0.82rem !important;
    }
}

@media (min-width: 992px) {
    html:not(.theme-dark) body.page-home .hero {
        padding-top: 3.5rem !important;
        padding-bottom: 4rem !important;
    }

    html:not(.theme-dark) body.page-home section {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    html:not(.theme-dark) body.page-home .exchange-widget,
    html:not(.theme-dark) body.page-home .transactions-table-container {
        border-radius: 24px !important;
    }

    /* Десктоп: чёрный текст в таблице транзакций (светлая тема) */
    html:not(.theme-dark) .transactions-table-container .recent-tx-date,
    html:not(.theme-dark) .transactions-table-container .recent-tx-amount,
    html:not(.theme-dark) .transactions-table-container .recent-tx-arrow {
        color: #16122a !important;
    }
}

/* В ТГ светлая тема: калькулятор не переопределяем — раскладка только из styles.css */
