﻿:root {
    --neon: #19f2a6;
    --neon-dark: #0b8c64;
    --bg-dark: #050505;
    --bg-glass: rgba(12, 12, 12, 0.86);
    --card-bg: rgba(255, 255, 255, 0.06);
    --muted: #a3a3a3;
    --danger: #ff7a7a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    overflow: hidden;
    color: #fff;
    position: fixed;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    position: relative;
    background-position: center bottom;
    background-size: cover;
    transition: background-image 0.45s ease;
}

.top-bar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 15px 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 20;
}

.header-icon {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-unit {
    flex: 1;
    display: flex;
    gap: 6px;
}

.progress-pill {
    flex: 1;
    height: 38px;
    background: rgba(0, 0, 0, 0.82);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    transition: width 0.3s ease;
}

.energy .fill {
    background: linear-gradient(90deg, #f7b500, #ffda69);
}

.money .fill {
    background: linear-gradient(90deg, #19f2a6, #57ffd0);
}

.info {
    position: relative;
    z-index: 2;
    line-height: 38px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.q-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.coin-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url('https://i.imgur.com/IaxIbDW.png') no-repeat center;
    background-size: contain;
    margin-right: 4px;
}

.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.screen {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.screen-bg {
    margin-top: 8px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.status-wrapper {
    margin-top: 6px;
    display: flex;
    justify-content: center;
}

.status-box {
    border-radius: 20px;
    padding: 6px 14px;
    border: 1px solid var(--neon);
    background: rgba(25, 242, 166, 0.16);
    color: var(--neon);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-space {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hero-character {
    height: 55vh;
    object-fit: contain;
    margin-bottom: -28px;
}

.hidden {
    display: none;
}

.action-zone {
    width: 100%;
    padding: 0 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timers-scroll-area {
    min-height: 64px;
    max-height: 100px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.timer-item {
    background: rgba(25, 242, 166, 0.14);
    border: 1px solid rgba(25, 242, 166, 0.7);
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
}

.timer-item.boost {
    border-color: #ffcc55;
    background: rgba(255, 204, 85, 0.14);
}

.main-work-btn {
    width: 100%;
    height: 76px;
    border: none;
    border-radius: 24px;
    background: var(--neon);
    color: #001c13;
    font-weight: 900;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 0 var(--neon-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-work-btn:active {
    transform: scale(0.98) translateY(3px);
    box-shadow: 0 4px 0 var(--neon-dark);
}

.t-big {
    font-size: 30px;
    line-height: 1;
}

.t-small {
    font-size: 12px;
    opacity: 0.8;
}

.helper-card {
    font-size: 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px;
    color: #ddd;
}

.tabs-container {
    display: flex;
    gap: 8px;
    padding: 15px;
}

.tab-btn {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #868686;
    font-size: 10px;
    font-weight: 800;
    padding: 10px 5px;
}

.tab-btn.active {
    border-color: var(--neon);
    color: var(--neon);
    background: rgba(25, 242, 166, 0.13);
}

.scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 100px;
}

.screen-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px 10px;
}

.screen-title-row h2 {
    font-size: 18px;
}

.link-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 800;
    color: var(--neon);
    background: rgba(25, 242, 166, 0.16);
}

.link-btn:disabled {
    opacity: 0.55;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.shop-card,
.task-card,
.form-card,
.withdraw-card,
.method-card,
.ref-card {
    border-radius: 18px;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.job-icon-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
}

.job-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.job-name {
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.job-stats {
    text-align: center;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 10px;
    min-height: 28px;
}

.buy-btn,
.secondary-btn,
.action-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
    padding: 10px;
}

.buy-btn,
.action-btn {
    background: var(--neon);
    color: #001f15;
}

.buy-btn.owned {
    background: #3c3c3c;
    color: #8f8f8f;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.task-card {
    margin-bottom: 10px;
}

.task-title {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 6px;
}

.task-desc {
    font-size: 12px;
    color: #d8d8d8;
    margin-bottom: 8px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.task-reward {
    font-size: 12px;
    color: #f5d778;
    font-weight: 800;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 100px;
}

.request-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
    font-size: 12px;
}

.request-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 6px;
}

.request-status.pending {
    background: rgba(255, 205, 92, 0.2);
    color: #ffd166;
}

.request-status.completed {
    background: rgba(25, 242, 166, 0.2);
    color: #7fffd4;
}

.request-status.rejected {
    background: rgba(255, 122, 122, 0.2);
    color: #ff9a9a;
}

.w-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.w-balance {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 28px;
    font-weight: 900;
}

.w-rate {
    margin-top: 8px;
    font-size: 11px;
    color: #e6e6e6;
}

.withdraw-section-title {
    margin: 12px 0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: #bdbdbd;
}

.field-label {
    font-size: 11px;
    color: #d6d6d6;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.textarea-field {
    resize: vertical;
}

.ref-card {
    margin: 10px 16px;
}

.ref-link-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--neon);
    font-family: Consolas, monospace;
    font-size: 11px;
    word-break: break-all;
    color: #d6ffef;
}

.ref-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 16px 100px;
}

.ref-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
    font-size: 12px;
}

.footer-nav {
    border-top: 1px solid #1a1a1a;
    background: #000;
    display: flex;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 14px));
}

.nav-btn {
    flex: 1;
    border: none;
    background: none;
    color: #575757;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.nav-btn.active {
    color: var(--neon);
}

.nav-btn small {
    font-size: 10px;
    font-weight: 800;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99;
}

.modal-box {
    width: 100%;
    max-width: 460px;
    background: #111;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 18px;
}

.modal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 10px 0;
}

.modal-close {
    margin-top: 10px;
    border: none;
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    font-weight: 900;
    background: var(--neon);
    color: #001f15;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.panel-box {
    max-height: 86vh;
    overflow-y: auto;
}

.setting-row {
    margin-bottom: 10px;
    border-radius: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #4a4a4a;
    transition: 0.2s ease;
}

.slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: 0.2s ease;
}

.switch input:checked + .slider {
    background: var(--neon);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.profile-stat {
    border-radius: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stat .label {
    font-size: 10px;
    color: #bababa;
}

.profile-stat .value {
    font-size: 14px;
    font-weight: 900;
    margin-top: 4px;
}

.empty-state {
    text-align: center;
    color: #a5a5a5;
    font-size: 12px;
    padding: 20px 10px;
}

.btn-glare {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: glare 3.2s infinite;
}

@keyframes glare {
    0% {
        left: -100%;
    }
    22% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@media (max-width: 420px) {
    .shop-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
}
