:root {
    --bg: #060d1a;
    --card-bg: #0d1b2e;
    --card-border: rgba(34, 211, 238, 0.15);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --green: #22c55e;
    --purple: #a855f7;
    --text: #e2e8f0;
    --muted: #64748b;
    --nav-bg: #0a1525;
    --nav-active: rgba(34, 211, 238, 0.12);
    --gradient-green: linear-gradient(135deg, #22c55e, #0ea5e9);
    --gradient-buy: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-featured: linear-gradient(135deg, #7c3aed, #a855f7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* CIRCUIT BACKGROUND */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
    background-size: 35px 35px;
    pointer-events: none;
    z-index: 0;
}

/* HEADER */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: rgba(6, 13, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
}

.balance-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 20px;
    padding: 5px 12px;
}

.rub-icon {
    font-size: 12px;
    color: var(--cyan);
    font-weight: 700;
}

.rub-label {
    font-size: 11px;
    color: var(--muted);
}

#balance {
    font-weight: 700;
    font-size: 13px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 17px;
}
.flag svg { border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--muted);
    display: flex;
    align-items: center;
}

/* MAIN CONTENT */
.app-content {
    position: fixed;
    top: 54px;
    bottom: 66px;
    left: 0;
    right: 0;
    overflow-y: auto;
    z-index: 1;
    padding: 14px 12px;
}

/* SECTIONS */
.tab-section {
    display: none;
}

.tab-section.active {
    display: block;
}

.section-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

/* CARD BLOCK */
.card-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}

.card-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

/* AMOUNT DISPLAY */
.amount-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    text-align: center;
    padding: 12px;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* SLIDER */
.slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--cyan), var(--blue));
    border-radius: 4px;
    outline: none;
    margin-bottom: 10px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--cyan);
    border: 2px solid white;
    cursor: pointer;
}

.amount-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text);
    padding: 7px 0;
    font-size: 13px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    transition: all 0.2s;
}

.preset-btn.active {
    background: rgba(34, 211, 238, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
}

.you-get {
    color: var(--cyan);
    font-size: 12px;
    margin-bottom: 8px;
}

.reward-list {
    margin-bottom: 10px;
}

.reward-row {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
    color: var(--muted);
}

.reward-row.cyan,
.reward-row span {
    color: var(--cyan);
}

.note {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 6px;
}

.bonus-text {
    text-align: center;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

/* BUTTONS */
.btn-main {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: var(--gradient-buy);
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    letter-spacing: 1px;
    transition: transform 0.15s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-main:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-green {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: var(--gradient-green);
    color: white;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-green:active {
    transform: scale(0.97);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--purple);
    background: transparent;
    color: var(--purple);
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
}

.divider-text {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 6px 4px 12px;
}

/* MINER UNLOCK CARD */
.miner-unlock-card {
    padding-bottom: 20px;
}

.miner-unlock-card .btn-main,
.miner-unlock-card .btn-miner-need-power,
.miner-unlock-card .btn-outline {
    width: 100%;
}


.miner-slider {
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.miner-slider .swiper-slide img,
.miner-slider-2 .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.unlock-info {
    text-align: center;
    margin-bottom: 10px;
}

.unlock-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.unlock-value {
    color: var(--cyan);
    font-weight: 700;
    font-size: 16px;
}

.unlock-sub {
    color: var(--text);
    font-size: 13px;
    margin-bottom: 10px;
}

.small-note {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--cyan) !important;
    --swiper-navigation-size: 18px;
}

/* TOGGLE TABS */
.toggle-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: rgba(34, 211, 238, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
}

.toggle-panel {
    display: none;
}

.toggle-panel.active {
    display: block;
}

/* REF BLOCK */
.ref-block {}

.ref-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}

.ref-link-text {
    flex: 1;
    font-size: 11px;
    color: var(--muted);
    word-break: break-all;
}

.copy-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--cyan);
}

/* LEVEL TABS */
.level-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.level-btn {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--muted);
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.level-btn.active {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #000;
    font-weight: 700;
}

.table-header {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.table-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 10px 0;
}

.bonus-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.bonus-item:last-child {
    border-bottom: none;
}

.bonus-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.bonus-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.bonus-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.bonus-note {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.cyan {
    color: var(--cyan);
}

/* MINER TAB */
.miner-main-card {}

.miner-slider-2 {
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.mining-btn {
    margin-top: 0;
}

.field-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.field-value {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sell-btn {}

.upgrade-btn {}

/* TASK ITEMS */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invite-task {
    margin-top: 0;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.task-item:hover {
    border-color: rgba(34, 211, 238, 0.3);
}

.task-item.completed {
    opacity: 0.6;
    cursor: default;
}

/* Expansion panel */
.task-expand-panel {
    background: var(--card-bg);
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 14px;
    padding: 16px;
    margin-top: -4px;
    overflow: hidden;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-expand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.task-expand-header .task-icon-wrap {
    width: 40px;
    height: 40px;
}

.task-expand-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.task-expand-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.task-expand-progress {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
}

.task-expand-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), #3b82f6);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.task-expand-progress-text {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}

.task-expand-reward {
    font-size: 14px;
    font-weight: 600;
    color: var(--cyan);
    margin-bottom: 14px;
}

.task-expand-btns {
    display: flex;
    gap: 10px;
}

.task-expand-btns .btn-action {
    flex: 1;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action.btn-invite {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    color: #fff;
}

.btn-action.btn-subscribe {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
}

.btn-action.btn-open-link {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    color: #fff;
}

.btn-action.btn-check {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: #fff;
}

.btn-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-action:active {
    transform: translateY(0);
}

.task-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-svg {
    color: var(--cyan);
}

.task-text {
    flex: 1;
}

.task-name {
    font-size: 13px;
    font-weight: 600;
}

.task-reward {
    font-size: 11px;
    color: var(--cyan);
    margin-top: 2px;
}

.task-progress {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.task-progress.btn-small,
.task-claim-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #22d3ee, #3b82f6) !important;
    background-size: 200% 200% !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    line-height: 1;
    border-radius: 22px;
    padding: 10px 20px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 3px 12px rgba(34, 211, 238, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    text-decoration: none;
    min-height: 36px;
}

.task-progress.btn-small::before,
.task-claim-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer-task-btn 2.5s infinite;
}

@keyframes shimmer-task-btn {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.task-progress.btn-small:hover,
.task-claim-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.5),
        0 0 30px rgba(34, 211, 238, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background-position: 100% 50% !important;
}

.task-progress.btn-small:active,
.task-claim-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 1px 4px rgba(34, 211, 238, 0.2);
}

/* Green variant for "Получить награду" subscription claim buttons */
.task-claim-btn[data-task-type="subscription"] {
    background: linear-gradient(135deg, #22c55e, #34d399, #059669) !important;
    background-size: 200% 200% !important;
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.task-claim-btn[data-task-type="subscription"]:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5),
        0 0 30px rgba(34, 197, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.task-action {
    flex-shrink: 0;
}

.task-link {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    word-break: break-all;
}

.task-done-badge {
    font-size: 12px;
    color: var(--green);
}

.task-loading {
    text-align: center;
    color: var(--muted);
    padding: 16px;
}

/* WITHDRAW TAB */
.withdraw-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.withdraw-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.withdraw-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.withdraw-item.featured {
    background: var(--gradient-featured);
    border: none;
}

.withdraw-group {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
}

.withdraw-group .withdraw-item {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
}

.withdraw-group .withdraw-item:last-child {
    border-bottom: none;
}

.wi-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.wi-svg {
    color: white;
}

.wi-arrow {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.reinvest-ico {
    background: rgba(255, 255, 255, 0.2);
}

.wi-text {
    flex: 1;
}

.fk-icon {
    background: #1a5276;
    color: #fff;
}

.trx-icon {
    background: #c0392b;
    color: #fff;
    font-size: 11px;
}

.bnb-icon {
    background: #f39c12;
    color: #000;
    font-size: 11px;
}

.ton-icon {
    background: #2980b9;
    color: #fff;
    font-size: 11px;
}

.ltc-icon {
    background: #7f8c8d;
    color: #fff;
    font-size: 11px;
}

.wi-name {
    font-size: 14px;
    font-weight: 700;
}

.wi-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.withdraw-item.featured .wi-sub {
    color: rgba(255, 255, 255, 0.8);
}

/* WITHDRAW METHOD UI */
.wd-method-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wd-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crypto-icon {
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.card-method-icon {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.wd-submit-btn {
    margin-top: 8px;
}

.wd-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.wd-select:focus {
    border-color: var(--cyan);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 22px;
    width: 100%;
    max-width: 340px;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}

.modal-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 12px;
    outline: none;
}

.modal-input:focus {
    border-color: var(--cyan);
}

.modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.modal-btns .btn-outline,
.modal-btns .btn-green {
    flex: 1;
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: var(--nav-bg);
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: stretch;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s;
    border-radius: 0;
    padding: 0;
}

.nav-btn.active {
    background: var(--nav-active);
    color: var(--cyan);
}

.nav-label {
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
}

/* Lucide icon sizes */
.nav-lucide {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

/* Иконки внутри кнопок майнеров */
.btn-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    flex-shrink: 0;
}

.lucide-sm {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    display: inline-block;
    vertical-align: middle;
}

.lucide-md {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.lucide-xs {
    width: 13px;
    height: 13px;
    stroke-width: 2;
    display: inline-block;
    vertical-align: middle;
}

/* Mining active state */
.mining-active {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.2);
    border-radius: 3px;
}

/* TOAST NOTIFICATION */
.toast-notification {
    position: fixed;
    bottom: 76px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(13, 27, 46, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 300;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}

.toast-notification.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* REFERRAL TABLE */
.ref-table-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.ref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
}

/* APP FOOTER */
.app-footer {
    position: fixed;
    bottom: 66px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: var(--muted);
    padding: 3px 0;
    background: var(--nav-bg);
    z-index: 99;
}

/* Adjust content for footer */
.app-content {
    bottom: 78px !important;
}

/* MINER TAB — summary row */
.miner-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.miner-stat-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
}

.miner-stat-label {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 4px;
}

.miner-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan);
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 10px;
}

/* MINER GRID */
.miners-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.miner-loading {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* MINER CARD */
.miner-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.miner-card.locked {
    opacity: 0.65;
    cursor: pointer;
    transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.miner-card.locked:hover {
    opacity: 0.8;
}

.miner-card.can-unlock {
    opacity: 1;
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.15),
        0 0 30px rgba(34, 211, 238, 0.05);
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        border-color: rgba(34, 211, 238, 0.5);
        box-shadow: 0 0 15px rgba(34, 211, 238, 0.15),
            0 0 30px rgba(34, 211, 238, 0.05);
    }

    50% {
        border-color: rgba(34, 211, 238, 0.8);
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.25),
            0 0 40px rgba(34, 211, 238, 0.1);
    }
}

.btn-miner-need-power {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-miner-need-power:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-miner-need-power:active {
    transform: translateY(0);
}

.miner-card.running {
    border-color: rgba(34, 211, 238, 0.4);
}

.miner-card.finished {
    border-color: rgba(34, 197, 94, 0.5);
}

.miner-card.cooldown {
    border-color: rgba(239, 68, 68, 0.35);
}

.miner-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.miner-card-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.miner-card-info {
    flex: 1;
}

.miner-card-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.miner-card-desc {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
}

.miner-card-stats {
    font-size: 11px;
    color: var(--cyan);
}

.level-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.miner-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.miner-progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.miner-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 3px;
    transition: width 1s linear;
}

.miner-progress-label {
    font-size: 10px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

.miner-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-idle {
    background: rgba(100, 116, 139, 0.2);
    color: var(--muted);
}

.badge-running {
    background: rgba(34, 211, 238, 0.15);
    color: var(--cyan);
}

.badge-finished {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.badge-cooldown {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-locked {
    background: rgba(100, 116, 139, 0.1);
    color: var(--muted);
}

.miner-action-row {
    display: flex;
    gap: 8px;
}

.btn-miner-start {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.02em;
}
.btn-miner-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}
.btn-miner-start:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.btn-miner-collect {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 50%, #d97706 100%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.02em;
}
.btn-miner-collect:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}
.btn-miner-collect:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-miner-unlock {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid var(--purple);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-miner-unlock:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.btn-miner-unlock:active {
    transform: translateY(0);
}

.btn-miner-disabled {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.6) 100%);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
/* Кнопка «Перезапуск через Xч» — акцент таймера */
.miner-action-row .btn-miner-disabled {
    max-width: none;
}

/* REVIEW MODAL STYLES */
.review-modal {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.review-modal-content {
    max-width: 520px;
    width: 100%;
    background: linear-gradient(135deg, #0d1b2e 0%, #1a2332 100%);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(34, 211, 238, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.review-modal-header {
    position: relative;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom: 1px solid rgba(34, 211, 238, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
}

.review-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
    flex-shrink: 0;
}

.review-modal-title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.5px;
}

.review-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.review-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: rotate(90deg);
}

.review-modal-body {
    padding: 24px;
}

.review-description {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.review-channel-link {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.review-channel-link:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.review-textarea-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.review-textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    border: 2px solid rgba(34, 211, 238, 0.15);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(13, 27, 46, 0.5));
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.review-textarea::placeholder {
    color: rgba(100, 116, 139, 0.5);
    transition: color 0.3s;
}

.review-textarea:focus::placeholder {
    color: rgba(100, 116, 139, 0.3);
}

.review-textarea:focus {
    border-color: var(--cyan);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45), rgba(13, 27, 46, 0.6));
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1),
        0 0 20px rgba(34, 211, 238, 0.05),
        inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.review-char-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.review-char-count span {
    color: var(--cyan);
}

.review-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.review-btn-cancel,
.review-btn-submit {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.review-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.review-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: translateY(-1px);
}

.review-btn-submit {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.review-btn-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    opacity: 0;
    transition: opacity 0.3s;
}

.review-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
}

.review-btn-submit:hover::before {
    opacity: 1;
}

.review-btn-submit:active {
    transform: translateY(0);
}

.review-btn-submit span {
    position: relative;
    z-index: 1;
}

.review-btn-submit svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.review-btn-submit:hover svg {
    transform: translateX(2px);
}

.review-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Miners horizontal scroll in Upgrade tab */
.miners-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 0 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.miners-scroll::-webkit-scrollbar { display: none; }
.mini-miner-card {
    flex: 0 0 140px;
    background: var(--card-bg, rgba(30,41,59,0.85));
    border: 1px solid rgba(100,116,139,0.25);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    position: relative;
}
.mini-miner-card.locked { opacity: 0.7; }
.mini-miner-img { width: 60px; height: 60px; object-fit: contain; margin: 4px auto; display: block; }
.mini-miner-name { font-size: 12px; font-weight: 600; color: #e2e8f0; margin-top: 4px; }
.mini-miner-stat { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.mini-miner-cost { font-size: 11px; color: #f59e0b; margin-top: 4px; }
.mini-miner-buy-btn {
    display: block; width: 100%; margin-top: 6px; padding: 6px 0;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff; border: none; border-radius: 8px;
    font-size: 11px; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 8px rgba(245,158,11,0.35);
    letter-spacing: 0.3px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.mini-miner-buy-btn:active { transform: scale(0.96); box-shadow: 0 1px 4px rgba(245,158,11,0.2); }

/* Friend task cards — collapsed by default */
.friend-task-card { flex-direction: column !important; align-items: stretch !important; gap: 0; padding: 12px !important; cursor: pointer; transition: background 0.2s; }
.friend-task-card.completed { flex-direction: row !important; align-items: center !important; cursor: default; }
.friend-task-top { display: flex; align-items: center; gap: 10px; }
.friend-task-counter { font-size: 13px; font-weight: 700; color: var(--cyan, #22d3ee); white-space: nowrap; }
.friend-task-expand { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; transition: transform 0.25s; font-size: 14px; color: #64748b; }
.friend-task-card.open .friend-task-expand { transform: rotate(180deg); }
.friend-task-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, margin-top 0.3s ease; margin-top: 0; }
.friend-task-card.open .friend-task-body { max-height: 120px; margin-top: 10px; }
.friend-progress-track { width: 100%; height: 6px; background: rgba(100,116,139,0.25); border-radius: 3px; overflow: hidden; }
.friend-progress-fill { height: 100%; background: linear-gradient(90deg, #06b6d4, #22d3ee); border-radius: 3px; transition: width 0.4s ease; }
.friend-task-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-friend-invite, .btn-friend-check {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 8px 0; border-radius: 8px; border: none; cursor: pointer;
    font-size: 13px; font-weight: 600;
}
.btn-friend-invite { background: var(--green, #22c55e); color: #fff; }
.btn-friend-invite:active { opacity: 0.85; }
.btn-friend-check { background: rgba(100,116,139,0.3); color: #e2e8f0; }
.btn-friend-check:active { opacity: 0.85; }

/* Locked miner buy button */
.btn-miner-buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff; border: none; border-radius: 8px;
    padding: 8px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; width: 100%;
}
.btn-miner-buy:active { opacity: 0.85; }

/* Settings modal */
.settings-modal-overlay { display: flex; align-items: flex-end; justify-content: center; }
.settings-modal {
    background: var(--card-bg, #0f172a); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 480px; max-height: 85vh;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(100,116,139,0.2); border-bottom: none;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.settings-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid rgba(100,116,139,0.15);
    position: sticky; top: 0; background: var(--card-bg, #0f172a); z-index: 2;
}
.settings-header h3 { margin: 0; font-size: 17px; color: #e2e8f0; }
.settings-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(100,116,139,0.2); border: none; color: #94a3b8;
    font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.settings-body { padding: 16px 20px 24px; }
.settings-section { margin-bottom: 4px; }
.settings-label { font-size: 13px; font-weight: 600; color: #94a3b8; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.settings-divider { height: 1px; background: rgba(100,116,139,0.15); margin: 16px 0; }
.lang-selector { display: flex; gap: 10px; }
.lang-card {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 12px; cursor: pointer;
    background: rgba(100,116,139,0.12); border: 2px solid transparent;
    color: #94a3b8; font-size: 14px; font-weight: 600;
    transition: all 0.2s;
}
.lang-card.active { border-color: var(--cyan, #22d3ee); color: #e2e8f0; background: rgba(34,211,238,0.08); }
.lang-card svg { border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); flex-shrink: 0; }

/* FAQ */
.faq-item { margin-bottom: 12px; background: rgba(100,116,139,0.08); border-radius: 10px; padding: 12px; }
.faq-q { font-size: 13px; font-weight: 700; color: #e2e8f0; margin-bottom: 6px; }
.faq-a { font-size: 12px; color: #94a3b8; line-height: 1.6; }
.faq-a b { color: var(--cyan, #22d3ee); }
.faq-table { display: flex; flex-direction: column; gap: 4px; }
.faq-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.faq-row span:first-child { flex: 1; text-align: right; color: #e2e8f0; }
.faq-row span:nth-child(2) { color: #475569; }
.faq-row span:last-child { flex: 1; color: var(--cyan, #22d3ee); }