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

/* Page loader bar */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    z-index: 9999;
    pointer-events: none;
    transition: none;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--accent);
}

.page-loader.loading {
    width: 85%;
    transition: width 8s cubic-bezier(0.1, 0.6, 0.3, 1);
}

.page-loader.done {
    width: 100%;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.3s ease 0.2s;
}

/* Page transition */
.main-content {
    animation: pageIn 0.35s ease both;
}

@keyframes pageIn {
    from { transform: translateY(12px); }
    to   { transform: translateY(0); }
}

body.page-leaving .main-content {
    animation: pageOut 0.18s ease both;
}

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

/* Center spinner during page transition */
.page-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

body.page-leaving .page-spinner {
    display: flex;
}

.page-spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinnerRotate 0.7s linear infinite;
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

/* Stagger animation for grid items */
.city-card,
.product-card,
.what-card,
.raion-card,
.balance-card,
.order-row,
.pay-method-card {
    animation: cardIn 0.35s ease both;
}

@keyframes cardIn {
    from { transform: translateY(16px) scale(0.97); }
    to   { transform: translateY(0) scale(1); }
}

/* Smooth button press */
.btn, .nav-btn, .nav-burger, .btn-copy-sm, .btn-theme, .pay-method-card {
    transition: all 0.2s ease;
}

.btn:active, .nav-btn:active {
    transform: scale(0.96);
}

/* Smooth focus ring */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

:root {
    --bg-body: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-input: #16213e;
    --accent: #e94560;
    --accent-hover: #c73652;
    --accent-secondary: #533483;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c80;
    --border: #2a2a40;
    --success: #2ecc71;
    --error: #e74c3c;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 12px;
}

[data-theme="light"] {
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-input: #f5f6f8;
    --accent: #e94560;
    --accent-hover: #c73652;
    --accent-secondary: #7c3aed;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a72;
    --text-muted: #8e8ea0;
    --border: #dcdde1;
    --success: #27ae60;
    --error: #e74c3c;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] body.has-bg::before {
    background: rgba(240, 242, 245, 0.85);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar, .nav-drawer, .topup-card, .welcome-card, .order-detail-card,
.order-summary, .result-card, .crypto-notice, .key-address,
.city-card, .product-card, .what-card, .raion-card, .balance-card,
.order-row, .pay-method-card, .rules-card, .topup-method {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

body.has-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 26, 0.82);
    z-index: 0;
    pointer-events: none;
}

body > * {
    position: relative;
    z-index: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

img, svg {
    transition: transform 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

.theme-toggle-float {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
}

/* Auth layout */
.auth-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.auth-logo {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #a78bfa, #6366f1, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 8px 20px;
    margin-bottom: 14px;
    border: 1.5px solid transparent;
    border-image: linear-gradient(135deg, #a78bfa, #6366f1, #818cf8) 1;
    border-radius: 0;
    line-height: 1.4;
    position: relative;
}

.auth-card h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Captcha */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-row img {
    height: 46px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.captcha-row input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.captcha-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #452a6b);
    color: #fff;
}

.btn-primary,
.btn-cancel {
    text-decoration: none;
    text-align: center;
}

/* Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--error);
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: var(--success);
}
.form-hint {
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin-top: 4px;
}

/* Auth footer link */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Telegram auth */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: #2AABEE;
    color: #fff;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
}

.btn-telegram:hover {
    background: #229ED9;
    color: #fff;
}

.btn-telegram:active {
    transform: scale(0.98);
}

.btn-telegram svg {
    flex-shrink: 0;
}

.tg-auth-hint {
    text-align: center;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    opacity: 0.8;
}

.tg-auth-status {
    text-align: center;
    margin-top: 12px;
    padding: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-input);
    border-radius: 8px;
    animation: tgPulse 1.5s ease-in-out infinite;
}

.tg-auth-status.success {
    color: var(--success);
    background: rgba(46, 204, 113, 0.12);
    animation: none;
}

@keyframes tgPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Protected pages layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

.navbar .logo {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

/* Desktop nav */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-btn:hover {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.08);
    color: var(--accent);
}

.nav-btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.nav-username {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-left: 4px;
}

.btn-theme {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: border-color 0.2s, background 0.2s;
    color: var(--text-secondary);
    padding: 0;
}

.btn-theme:hover {
    border-color: var(--accent);
    background: var(--bg-input);
}

.navbar .btn-logout {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    text-decoration: none;
}

.navbar .btn-logout:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Burger button — hidden on desktop */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 9px 0;
    transition: border-color 0.2s;
}

.nav-burger span {
    display: block;
    width: 18px;
    height: 3px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: background 0.2s;
}

.nav-burger:hover {
    border-color: var(--accent);
}

.nav-burger:hover span {
    background: var(--accent);
}

/* Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-overlay.open {
    display: block;
    opacity: 1;
}

/* Drawer */
.nav-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}

.nav-drawer.open {
    right: 0;
}

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.nav-drawer-user {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.nav-drawer-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.nav-drawer-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-drawer-links {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-drawer-link:hover {
    background: var(--bg-input);
    color: var(--accent);
}

.nav-drawer-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-drawer-footer {
    border-top: 1px solid var(--border);
    padding: 8px 0;
}

.nav-drawer-logout:hover {
    color: var(--error);
}

body.menu-open {
    overflow: hidden;
}

[data-theme="light"] .nav-drawer {
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .nav-overlay.open {
    background: rgba(0,0,0,0.25);
}

/* Show burger, hide desktop on mobile */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    .nav-burger {
        display: flex;
    }
}

/* Панель балансов */
.balance-bar {
    display: flex;
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.balance-item {
    flex: 1;
    background: var(--bg-card);
    padding: 14px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.balance-item:hover {
    background: rgba(10, 10, 20, 0.5);
}

.balance-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.balance-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-rub .balance-value {
    color: var(--success);
}

.balance-btc .balance-value {
    color: #f7931a;
}

.balance-ltc .balance-value,
.balance-ltc .balance-card-value {
    color: #bfbbbb;
}

/* Карточки балансов на главной */
.balance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.balance-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.balance-card:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    transform: translateY(-2px);
}

.balance-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.balance-card-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0;
}

.balance-rub .balance-card-value {
    color: var(--success);
}

.balance-btc .balance-card-value {
    color: #f7931a;
}

.balance-ltc .balance-card-value {
    color: #bfbbbb;
}

.balance-card-action {
    font-size: 0.78rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 12px;
    margin-top: 4px;
    transition: border-color 0.2s, color 0.2s;
}

.balance-card:hover .balance-card-action {
    border-color: var(--accent);
    color: var(--accent);
}

.main-content {
    flex: 1;
    padding: 40px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.welcome-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.welcome-card h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.welcome-card p {
    color: var(--text-secondary);
}

/* Заголовок секции */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-left: 4px;
}

/* Сетка городов */
.city-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.city-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.city-stock {
    font-size: 0.78rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 12px;
}

.city-card:not(.city-empty) {
    border-color: var(--success);
}
.city-card:not(.city-empty):hover {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.06);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.city-empty {
    border-color: var(--error);
    cursor: pointer;
}
.city-empty:hover {
    border-color: var(--error);
    background: rgba(231, 76, 60, 0.06);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Сетка товаров */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.product-card:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    transform: translateY(-2px);
}

.product-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-attr {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
    margin-top: 4px;
}

.product-stock {
    font-size: 0.78rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 12px;
    margin-top: 2px;
}

/* Карточка информации о товаре */
.product-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    text-align: center;
}

.product-info-header {
    margin-bottom: 12px;
}

.product-info-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-info-attr {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.product-info-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--success);
    margin: 12px 0;
}

.product-info-descr {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Сетка типов клада */
.what-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.what-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.what-card:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Сводка заказа */
.order-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
}

.order-summary-row:last-child {
    border-bottom: none;
}

.order-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.order-summary-value {
    font-weight: 600;
    color: var(--text-primary);
}

.order-price {
    color: var(--success);
    font-size: 1.1rem;
}

/* Сетка районов */
.raion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.raion-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.raion-card:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Правила магазина */
.rules-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-top: 20px;
}

.rules-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

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

.rules-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.rules-actions .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    border-color: var(--error);
    color: var(--error);
}

.btn-danger {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
}

.btn-danger:hover {
    background: rgba(233, 69, 96, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Способы оплаты */
.pay-finance {
    margin-top: 20px;
}

.pay-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-method-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.pay-method-card:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    transform: translateY(-1px);
}

.pay-method-balance {
    border-color: var(--success);
}

.pay-method-balance:hover {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.08);
}

.pay-method-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: 10px;
}

.pay-method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.pay-method-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pay-method-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pay-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.pay-actions .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
}

/* Хлебные крошки */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    margin: 0 8px;
    color: var(--text-muted);
}

/* Страница пополнения */
.topup-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 560px;
    margin: 0 auto;
}

.topup-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.topup-header h2 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.topup-current {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 24px;
    background: var(--bg-input);
    border-radius: 10px;
}

.topup-current-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.topup-current-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.balance-rub .topup-current-value {
    color: var(--success);
}

.balance-btc .topup-current-value {
    color: #f7931a;
}

.balance-ltc .topup-current-value {
    color: #bfbbbb;
}

.topup-methods {
    padding: 24px 32px;
}

.topup-methods-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.topup-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
}

.topup-method-name {
    font-weight: 500;
    color: var(--text-primary);
}

.topup-method-status {
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(233, 69, 96, 0.12);
    color: var(--accent);
    font-weight: 500;
}

.topup-notice {
    padding: 16px 32px 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Адаптив — планшет */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .balance-item {
        padding: 12px 16px;
    }

    .balance-value {
        font-size: 1rem;
    }

    .main-content {
        padding: 24px 16px;
    }

    .welcome-card {
        padding: 28px 20px;
    }

    .balance-grid,
    .city-grid,
    .product-grid,
    .what-grid,
    .raion-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-info-card {
        padding: 24px 20px;
    }

    body.has-bg {
        background-attachment: scroll;
    }
}

/* Адаптив — мобильный */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 10px;
    }

    .auth-card h1 {
        font-size: 1.5rem;
    }

    .captcha-row {
        flex-direction: column;
    }

    .captcha-row img {
        width: 100%;
        height: auto;
    }

    .navbar {
        padding: 0 12px;
        height: 52px;
    }

    .navbar .logo {
        font-size: 1rem;
    }

    .balance-bar {
        flex-direction: column;
        gap: 1px;
    }

    .balance-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 16px;
    }

    .balance-value {
        font-size: 1rem;
    }

    .balance-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .balance-card {
        flex-direction: row;
        justify-content: space-between;
        padding: 14px 16px;
        gap: 8px;
    }

    .balance-card-value {
        font-size: 1.1rem;
        flex: 1;
        text-align: right;
        margin: 0;
    }

    .balance-card-action {
        margin-top: 0;
    }

    .city-grid,
    .product-grid,
    .what-grid,
    .raion-grid {
        grid-template-columns: 1fr;
    }

    .order-summary-row {
        padding: 12px 16px;
    }

    .rules-card {
        padding: 20px 16px;
    }

    .rules-actions,
    .pay-actions {
        flex-direction: column;
    }

    .city-card {
        padding: 16px;
    }

    .product-card {
        flex-direction: row;
        justify-content: space-between;
        padding: 14px 16px;
        gap: 8px;
    }

    .product-name {
        flex: 1;
        text-align: left;
    }

    .product-price {
        font-size: 1.1rem;
        margin-top: 0;
    }

    .product-stock {
        margin-top: 0;
    }

    .topup-header {
        padding: 24px 20px 20px;
    }

    .topup-methods {
        padding: 20px 16px;
    }

    .topup-notice {
        padding: 12px 16px 20px;
    }

    .main-content {
        padding: 16px 12px;
    }

    .welcome-card {
        padding: 24px 16px;
    }

    .welcome-card h2 {
        font-size: 1.2rem;
    }
}

/* Адаптив — маленькие мобилки */
@media (max-width: 360px) {
    .auth-card {
        padding: 20px 16px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .captcha-row input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* ========== Результат покупки ========== */

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 30px 24px;
    text-align: center;
    margin-bottom: 20px;
}
.result-card.result-success {
    border-color: rgba(46, 204, 113, 0.25);
}
.result-card.result-error {
    border-color: rgba(231, 76, 60, 0.25);
}
.result-card.result-notice {
    border-color: rgba(168, 85, 247, 0.25);
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.result-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.result-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px;
}
.result-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.key-address {
    margin-top: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}
.key-address-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--accent);
}
.key-address-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    word-break: break-all;
    white-space: pre-wrap;
    padding: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 14px;
}
.btn-copy {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.85rem;
}

.result-card.result-invoice {
    border-color: rgba(168, 85, 247, 0.25);
}

.result-card.result-detected {
    border-color: rgba(46, 204, 113, 0.25);
    margin-top: 16px;
    animation: fadeInDetected 0.4s ease;
}

@keyframes fadeInDetected {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.crypto-notice {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.crypto-notice p {
    margin: 0 0 6px;
}
.crypto-notice p:last-child {
    margin-bottom: 0;
}

[data-theme="light"] .crypto-notice {
    background: #f9fafb;
}
[data-theme="light"] .result-card {
    background: #fff;
}
[data-theme="light"] .key-address {
    background: #f9fafb;
}
[data-theme="light"] .key-address-text {
    background: #fff;
}

/* ========== Список заказов ========== */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    color: var(--text-primary);
}
.order-row:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    color: var(--text-primary);
}

.order-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.order-row-id {
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    font-size: 0.9rem;
}
.order-row-product {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-row-city {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.order-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 16px;
}
.order-row-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.order-row-sum {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--success);
    white-space: nowrap;
}

/* Детальный просмотр заказа */
.order-detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.order-detail-id {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}
.order-detail-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
}
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.page-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Card payment page */
.card-requisites {
    margin-top: 20px;
}
.card-req-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.card-req-row:last-child {
    border-bottom: none;
}
.card-req-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 12px;
}
.card-req-value {
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}
.card-req-value-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-copy-sm {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.btn-copy-sm:hover {
    opacity: 0.85;
}

.card-search-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: cardSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes cardSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .card-req-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .card-req-value-wrap {
        width: 100%;
        justify-content: space-between;
    }
}

[data-theme="light"] .order-row {
    background: #fff;
}
[data-theme="light"] .order-row:hover {
    background: #f3f4f6;
}
[data-theme="light"] .order-detail-card {
    background: #fff;
}

@media (max-width: 600px) {
    .order-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
    }
    .order-row-right {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-left: 0;
    }
    .order-row-left {
        flex-wrap: wrap;
    }
}

/* Active order banner */
.active-order-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}
.active-order-banner-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
}
.active-order-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.active-order-text {
    color: var(--text-secondary);
    font-size: 13px;
    flex: 1;
    min-width: 0;
}
.active-order-text strong {
    color: #f59e0b;
}
.active-order-link {
    background: #f59e0b;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.active-order-link:hover {
    background: #d97706;
}
[data-theme="light"] .active-order-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.05));
}

/* Alert banner */
.alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    animation: alertSlideIn 0.3s ease;
}
@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}
.alert-error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--error);
}
.alert-warning,
.flood-ban-banner {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}
[data-theme="light"] .alert-warning,
[data-theme="light"] .flood-ban-banner {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.5);
    color: #b45309;
}
.flood-countdown-line {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--text-muted, rgba(255,255,255,0.75));
}
.flood-countdown-line strong {
    color: var(--accent);
}
.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 12px;
    opacity: 0.7;
}
.alert-close:hover {
    opacity: 1;
}

/* Crypto tx spinner */
.tx-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(34, 197, 94, 0.2);
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

/* Loading dots */
.tx-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}
.tx-dots span {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: txDotPulse 1.4s ease-in-out infinite;
}
.tx-dots span:nth-child(2) { animation-delay: 0.2s; }
.tx-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes txDotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.1); }
}

.sbp-help-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.sbp-help-buttons .btn-sbp-help {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
    cursor: pointer;
    border: none;
}
.sbp-help-buttons .btn-sbp-help:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-sbp-sber {
    background: #21a038;
    color: #fff;
}
.btn-sbp-tbank {
    background: #ffdd2d;
    color: #333;
}

.sbp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: sbpModalFadeIn 0.2s ease;
}
.sbp-modal-overlay.open {
    display: flex;
}
@keyframes sbpModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.sbp-modal {
    background: var(--card-bg, #1e1e2e);
    border-radius: 16px;
    width: 94%;
    max-width: 600px;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: sbpModalSlideUp 0.25s ease;
}
@keyframes sbpModalSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.sbp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
}
.sbp-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}
.sbp-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.sbp-modal-close:hover {
    color: var(--text-primary, #fff);
}
.sbp-modal iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* Contacts block */
.contacts-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 480px) {
    .contacts-block {
        grid-template-columns: 1fr 1fr;
    }
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    animation: cardIn 0.35s ease both;
}
.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.contact-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.contact-value {
    font-size: 0.9rem;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal alert */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%;
    max-width: 360px;
    padding: 28px 24px 20px;
    text-align: center;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}
.modal-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}
.modal-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: break-word;
}
.modal-btn {
    display: inline-block;
    padding: 10px 32px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}
.modal-btn:hover {
    opacity: 0.9;
}
.modal-btn:active {
    transform: scale(0.97);
}
.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.modal-btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.modal-btn-cancel:hover {
    background: var(--border);
    color: var(--text-primary);
    opacity: 1;
}
