/* ==========================================================================
   PAXIO Offers Portal - Стили (style.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #0b0e14;
    --surface: #11151d;
    --surface-el: #181e2a;
    --border: #222938;
    --text: #ecf0f8;
    --text-m: #848da0;
    --accent: #ff6b00;
    --accent-h: #ff8522;
    --accent-s: rgba(255, 107, 0, 0.1);
    --green: #2eb872;
    --green-s: rgba(46, 184, 114, 0.1);
    --blue: #3b82f6;
    --blue-s: rgba(59, 130, 246, 0.1);
    --font: 'Space Grotesk', system-ui, sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius: 12px;
}

/* === Светлая тема === */
[data-theme="light"] {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-el: #f0f1f5;
    --border: #e0e3ea;
    --text: #1a1a2e;
    --text-m: #6b7280;
    --accent: #e85d00;
    --accent-h: #d45400;
    --accent-s: rgba(232, 93, 0, 0.08);
    --green: #16a34a;
    --green-s: rgba(22, 163, 74, 0.08);
    --blue: #2563eb;
    --blue-s: rgba(37, 99, 235, 0.08);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

[data-theme="light"] .ambient-glow { display: none; }
[data-theme="light"] header { background: rgba(255,255,255,0.85); border-bottom-color: var(--border); }
[data-theme="light"] .auth-card { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }

/* === Сброс стилей === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* === Анимация фона (декоративный свет) === */
.ambient-glow {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.ambient-glow .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
}
.orb-1 { width: 600px; height: 600px; top: -100px; right: -100px; background: rgba(255, 107, 0, 0.04); }
.orb-2 { width: 500px; height: 500px; bottom: -100px; left: -100px; background: rgba(59, 130, 246, 0.03); }

/* === Контейнеры и разметка === */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

header {
    background: rgba(17, 21, 29, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
    text-decoration: none;
    color: var(--text);
}
.logo .x { color: var(--accent); }

.user-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-nav span {
    font-size: 14px;
    color: var(--text-m);
}
.user-nav strong {
    color: var(--text);
}

.role-badge {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: .05em;
    display: inline-block;
}
.role-badge.admin { background: var(--accent-s); color: var(--accent); border: 1px solid rgba(255,107,0,0.2); }
.role-badge.merchant { background: var(--green-s); color: var(--green); border: 1px solid rgba(46,184,114,0.2); }
.role-badge.aggregator { background: var(--blue-s); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }

main.main-content {
    flex: 1;
    padding: 40px 0;
}

footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    background: rgba(11, 14, 20, 0.5);
    text-align: center;
    color: var(--text-m);
    font-size: 13px;
}

/* === Кнопки === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    gap: 8px;
    outline: none;
}

.btn-primary {
    background: var(--accent);
    color: #0b0e14;
}
.btn-primary:hover {
    background: var(--accent-h);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--surface-el);
    border-color: #353d4c;
    transform: translateY(-1px);
}

.btn-accent-outline {
    background: var(--accent-s);
    color: var(--accent);
    border-color: var(--accent);
}
.btn-accent-outline:hover {
    background: var(--accent);
    color: #0b0e14;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--green-s);
    color: var(--green);
    border-color: rgba(46, 184, 114, 0.2);
}
.btn-success:hover {
    background: var(--green);
    color: #0b0e14;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* === Формы авторизации (Login & Register) === */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}
.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 8px;
}
.auth-header p {
    color: var(--text-m);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-m);
}

.form-control {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: all 0.2s var(--ease);
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-s);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-m);
}
.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* === Уведомления === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.alert-success {
    background: var(--green-s);
    color: var(--green);
    border-color: rgba(46, 184, 114, 0.2);
}
.alert-info {
    background: var(--blue-s);
    color: var(--blue);
    border-color: rgba(59, 130, 246, 0.2);
}

/* === Пользовательский дашборд === */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}
.dashboard-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.search-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius);
}
.search-filter-bar .search-input {
    flex: 1;
    min-width: 200px;
}
.search-filter-bar select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: var(--radius);
    outline: none;
    font-family: var(--font);
    cursor: pointer;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.offer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.offer-card:hover {
    border-color: #353d4c;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.offer-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
}
.offer-card:hover::before { opacity: 1; }

.offer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.offer-provider-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offer-logo-container {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface-el);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.offer-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.offer-logo-container .logo-placeholder {
    font-weight: 700;
    color: var(--accent);
    font-size: 16px;
}

.offer-provider-name {
    font-size: 16px;
    font-weight: 700;
}

.geo-tag {
    font-size: 11px;
    font-weight: 700;
    background: var(--blue-s);
    color: var(--blue);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: .02em;
}

.offer-method {
    font-size: 14px;
    color: var(--text-m);
    margin-bottom: 16px;
    font-weight: 500;
}

.offer-rates {
    display: flex;
    gap: 16px;
    align-items: baseline;
    margin-bottom: 12px;
}
.rate-value-in {
    font-size: 26px;
    font-weight: 800;
    color: var(--green);
    font-variant-numeric: tabular-nums;
}
.rate-value-out {
    font-size: 15px;
    font-weight: 600;
    color: var(--blue);
}

.offer-limits {
    font-size: 12px;
    color: var(--text-m);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 10px;
}

/* === Модальные окна (Детали офферов) === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 10, 0.85);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}
.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    box-shadow: var(--shadow);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: none;
    border: none;
    color: var(--text-m);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close-btn:hover { color: var(--text); }

.modal-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.modal-header-info h2 {
    font-size: 24px;
    font-weight: 800;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.modal-grid-item {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius);
}
.modal-grid-item .label {
    font-size: 10px;
    color: var(--text-m);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}
.modal-grid-item .value {
    font-size: 16px;
    font-weight: 700;
}
.modal-grid-item .value.green { color: var(--green); }
.modal-grid-item .value.blue { color: var(--blue); }

.modal-section {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 16px;
}
.modal-section h3 {
    font-size: 13px;
    color: var(--text-m);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}
.modal-section p {
    font-size: 14px;
    line-height: 1.6;
}

.modal-cta-area {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

/* === Админ-панель === */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}
.admin-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-m);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border-bottom: 2px solid transparent;
}
.admin-tab:hover {
    color: var(--text);
}
.admin-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.admin-tabs .admin-tab[onclick*="tab-analytics"],
.admin-tabs .admin-tab[onclick*="tab-logs"],
.admin-tabs .admin-tab[onclick*="tab-settings"] {
    display: none;
}
.admin-tab-content {
    display: none;
}
.admin-tab-content.active {
    display: block;
    animation: tabFadeIn 0.35s var(--ease) forwards;
}
.monitoring-card {
    min-height: 150px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.monitoring-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 14px 34px rgba(255, 106, 0, 0.12);
}
.monitoring-card-icon {
    font-size: 28px;
}
.monitoring-card strong {
    font-size: 18px;
}
.monitoring-card small {
    color: var(--text-m);
    line-height: 1.45;
}

/* Таблицы */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

table.admin-table th, table.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table.admin-table th {
    background: var(--surface-el);
    font-weight: 700;
    color: var(--text-m);
}

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

table.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Формы настроек в Админке */
.admin-flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rate-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.rate-editor-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--surface-el);
}
.rate-editor-section h4 {
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-m);
}

/* Картинки и инпуты файлов */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.file-upload-wrapper:hover {
    border-color: var(--accent);
}
.file-upload-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.import-export-area {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* === Боковой фильтр и новый макет дашборда === */
.dashboard-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
}

.sidebar-filters {
    width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    flex-shrink: 0;
}

.filter-section h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-m);
    margin-bottom: 15px;
}

.filter-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-m);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    margin-bottom: 4px;
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}
.filter-btn.active {
    background: var(--accent-s);
    color: var(--accent);
    font-weight: 600;
}
.filter-btn .count {
    float: right;
    font-size: 12px;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.main-content-area {
    flex: 1;
    min-width: 0;
}

.topbar-dashboard {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-box-dashboard {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.search-box-dashboard input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px 12px 44px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.search-box-dashboard input:focus {
    border-color: var(--accent);
}
.search-box-dashboard::before {
    content: '⌕';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-m);
    pointer-events: none;
}

.direction-toggle-dashboard {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 2px;
}
.direction-toggle-dashboard button {
    background: none;
    border: none;
    color: var(--text-m);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border-radius: 10px;
}
.direction-toggle-dashboard button.active {
    background: var(--accent);
    color: #0b0e14;
}
.direction-toggle-dashboard button:hover:not(.active) {
    color: var(--text);
}

.results-header-dashboard {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}
.results-header-dashboard h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.results-count-dashboard {
    font-size: 14px;
    color: var(--text-m);
}

/* === Дополнительные сетки и компактность === */
.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.form-grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

table.admin-table.table-compact th, table.admin-table.table-compact td {
    padding: 10px 12px;
    font-size: 13px;
}

/* Компактный вывод тарифов */
.rate-label-in {
    color: var(--green);
    font-weight: 700;
}
.rate-label-out {
    color: var(--blue);
    font-weight: 700;
}
.rate-value {
    font-weight: 600;
    color: var(--text);
}
.rate-subtext {
    font-size: 11px;
    color: var(--text-m);
    font-weight: normal;
    margin-left: 2px;
}

.confirm-modal-content {
    padding: 30px 40px;
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .offers-grid { grid-template-columns: 1fr; }
    .rate-editor-grid { grid-template-columns: 1fr; }
    .modal-grid { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .search-filter-bar { flex-direction: column; }
    .import-export-area { flex-direction: column; align-items: stretch; }
    table.admin-table { font-size: 13px; }
    table.admin-table th, table.admin-table td { padding: 10px 12px; }
    
    .form-grid-12 {
        grid-template-columns: 1fr;
    }
    .col-12, .col-8, .col-6, .col-4, .col-3 {
        grid-column: span 12;
    }
    
    .dashboard-layout {
        flex-direction: column;
        gap: 20px;
    }
    .sidebar-filters {
        width: 100%;
    }
    .topbar-dashboard {
        flex-direction: column;
        align-items: stretch;
    }
    .direction-toggle-dashboard {
        justify-content: center;
    }
    
    header .container {
        height: auto;
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .user-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .user-nav span {
        display: none;
    }
    .modal-content {
        padding: 24px 16px;
    }
    .confirm-modal-content {
        padding: 24px 16px;
    }
    .auth-card {
        padding: 30px 20px;
    }
}

/* Карточки статистики админки */
.admin-stat-card {
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.admin-stat-card:hover {
    border-color: #353d4c !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Анимация переключения вкладок */
@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Космическая сцена страницы ожидания === */
.space-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 40px 20px;
    text-align: center;
}

.cosmic-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.space-scene {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Эффект атмосферы вокруг Земли */
.earth-atmosphere {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
    animation: pulseAtmosphere 4s ease-in-out infinite alternate;
    z-index: 1;
}

/* Сама Земля */
.earth {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle at 30% 30%, #3b82f6 0%, #1e3a8a 70%, #0f172a 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    overflow: hidden;
    z-index: 2;
    transform: translateZ(0);
    transform-style: preserve-3d;
}

/* Контейнер для вращающихся континентов */
.earth-continents {
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 2;
    animation: rotateEarth 12s linear infinite;
    pointer-events: none;
}

/* Орбитальные кольца вокруг Земли */
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
    pointer-events: none;
}

.orbit-ring-1 {
    width: 180px;
    height: 180px;
    border-color: rgba(59, 130, 246, 0.2);
    animation: ringRotate1 10s linear infinite;
}

.orbit-ring-2 {
    width: 220px;
    height: 220px;
    border-color: rgba(147, 51, 234, 0.15);
    border-style: dashed;
    animation: ringRotate2 14s linear infinite reverse;
}

.orbit-ring-3 {
    width: 260px;
    height: 260px;
    border-color: rgba(59, 130, 246, 0.08);
    border-style: dotted;
    border-width: 2px;
    animation: ringRotate3 20s linear infinite;
}

/* Светящиеся точки на кольцах */
.orbit-ring-1::after,
.orbit-ring-2::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 12px #3b82f6, 0 0 24px rgba(59, 130, 246, 0.4);
}

.orbit-ring-1::after {
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
}

.orbit-ring-2::after {
    bottom: 10%;
    right: -3px;
    background: #9333ea;
    box-shadow: 0 0 12px #9333ea, 0 0 24px rgba(147, 51, 234, 0.4);
}

@keyframes ringRotate1 {
    from { transform: rotateX(65deg) rotateZ(0deg); }
    to   { transform: rotateX(65deg) rotateZ(360deg); }
}

@keyframes ringRotate2 {
    from { transform: rotateX(75deg) rotateY(25deg) rotateZ(0deg); }
    to   { transform: rotateX(75deg) rotateY(25deg) rotateZ(360deg); }
}

@keyframes ringRotate3 {
    from { transform: rotateX(55deg) rotateY(-15deg) rotateZ(0deg); }
    to   { transform: rotateX(55deg) rotateY(-15deg) rotateZ(360deg); }
}

@keyframes rotateEarth {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes pulseAtmosphere {
    0%   { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* === Анимации появления карточек === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offer-card {
    animation: fadeInUp 0.5s ease-out both;
}

.offer-card:nth-child(1) { animation-delay: 0.05s; }
.offer-card:nth-child(2) { animation-delay: 0.1s; }
.offer-card:nth-child(3) { animation-delay: 0.15s; }
.offer-card:nth-child(4) { animation-delay: 0.2s; }
.offer-card:nth-child(5) { animation-delay: 0.25s; }
.offer-card:nth-child(6) { animation-delay: 0.3s; }
.offer-card:nth-child(7) { animation-delay: 0.35s; }
.offer-card:nth-child(8) { animation-delay: 0.4s; }

.stat-card {
    animation: fadeInUp 0.4s ease-out both;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Кнопка переключения темы */
.theme-toggle-btn {
    cursor: pointer;
    background: transparent !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
    background: var(--surface-el) !important;
}
