/* ============================
   Forceboost v1.2 — Full CSS
   ============================ */

:root {
    --bg-color: #050505;
    --accent: #00f2ff;
    --text-1: #ffffff;
    --text-2: rgba(255, 255, 255, 0.5);
    --card: rgba(20, 20, 20, 0.7);
    --border: rgba(255, 255, 255, 0.08);
    --nav-h: 60px;
    --green: #00ff7f;
    --red: #ff4466;
    --rarity-common: #9e9e9e;
    --rarity-rare: #00b0ff;
    --rarity-epic: #aa00ff;
    --rarity-legendary: #ffab00;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-color);
    color: var(--text-1);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    user-select: none;
    -webkit-user-select: none;
    -webkit-text-size-adjust: 100%;
}

.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Screens */
.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    padding: 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: fadeIn 0.25s ease-out;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================
   Login Screen
   ============================ */
.glass-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    margin: auto 0;
}

.title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
}

.subtitle {
    font-size: 13px;
    color: var(--text-2);
    text-align: center;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#nickname-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 16px;
    font-family: inherit;
    transition: 0.3s;
    -webkit-appearance: none;
}

#nickname-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.15);
}

.primary-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s;
    -webkit-appearance: none;
}

.primary-btn:active {
    transform: scale(0.97);
}

/* ============================
   Main Screen
   ============================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.welcome {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-rank {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* MC Skin (header) */
.mc-skin-small {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.skin-head-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    image-rendering: pixelated;
}

/* MC Server Status */
.mc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 12px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.mc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
    transition: 0.3s;
}

.mc-status-dot.online {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s infinite;
}

.mc-status-text {
    font-size: 12px;
    color: var(--text-2);
    flex: 1;
}

.mc-status-players {
    font-size: 12px;
    font-weight: 600;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Coin Display */
.coin-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.coin-icon {
    font-size: 20px;
    line-height: 1;
}

.coin-count {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
    line-height: 1.1;
}

.tap-bonus-label {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

/* Tap Area */
.tap-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    padding: 4px 0;
}

.tap-circle {
    width: min(52vw, 200px);
    height: min(52vw, 200px);
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.95), rgba(8, 8, 8, 0.98));
    border-radius: 50%;
    position: relative;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.06), inset 0 0 12px rgba(255, 255, 255, 0.02);
    transition: transform 0.08s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
}

.tap-circle.tapped {
    transform: scale(0.93);
}

.tap-circle.no-energy {
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.3);
}

.tap-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(30, 30, 30, 1), rgba(12, 12, 12, 1));
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.tap-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    pointer-events: none;
}

/* Energy */
.energy-footer {
    padding: 6px 0 2px;
    flex-shrink: 0;
}

.energy-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
}

.energy-label {
    color: var(--text-2);
}

.energy-value {
    font-weight: 600;
}

.energy-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.energy-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent), #0088ff);
    border-radius: 100px;
    transition: width 0.3s;
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.2);
}

/* Tap Popup */
.coin-popup {
    position: fixed;
    pointer-events: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 20px;
    animation: floatUp 0.7s ease-out forwards;
    z-index: 9999;
    text-shadow: 0 0 6px rgba(0, 242, 255, 0.3);
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-70px);
        opacity: 0;
    }
}

/* ============================
   Shop Screen
   ============================ */
.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.coins-badge {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
}

/* MC Nick Bar */
.mc-nick-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.mc-nick-label {
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
}

.mc-nick-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.mc-nick-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: 0.15s;
}

.mc-nick-btn:active {
    transform: scale(0.95);
}

/* Shop Tabs */
.shop-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 10px;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.shop-tabs::-webkit-scrollbar {
    display: none;
}

.shop-tab {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
}

.shop-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shop-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.shop-card:active {
    transform: scale(0.97);
}

.shop-card.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.shop-card.buying {
    animation: buyPulse 0.3s ease;
}

@keyframes buyPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.92);
    }
}

/* Rarity borders */
.shop-card.rarity-common {
    border-color: rgba(158, 158, 158, 0.3);
}

.shop-card.rarity-rare {
    border-color: rgba(0, 176, 255, 0.3);
}

.shop-card.rarity-epic {
    border-color: rgba(170, 0, 255, 0.3);
}

.shop-card.rarity-legendary {
    border-color: rgba(255, 171, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 171, 0, 0.08);
}

/* Rarity glow on hover/active */
.shop-card.rarity-legendary:active {
    box-shadow: 0 0 25px rgba(255, 171, 0, 0.15);
}

.shop-card.rarity-epic:active {
    box-shadow: 0 0 20px rgba(170, 0, 255, 0.15);
}

.shop-card-img-wrap {
    width: 56px;
    height: 56px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shop-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.rarity-badge {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.rarity-common .rarity-badge {
    background: var(--rarity-common);
    color: #000;
}

.rarity-rare .rarity-badge {
    background: var(--rarity-rare);
    color: #000;
}

.rarity-epic .rarity-badge {
    background: var(--rarity-epic);
    color: #fff;
}

.rarity-legendary .rarity-badge {
    background: var(--rarity-legendary);
    color: #000;
}

.shop-card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.shop-card-desc {
    font-size: 10px;
    color: var(--text-2);
}

.shop-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.shop-card-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

.shop-card-owned {
    font-size: 10px;
    color: var(--green);
}

.shop-card-limit {
    font-size: 10px;
    color: var(--red);
    font-weight: 600;
}

/* Purchase Toast */
.purchase-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 20, 0, 0.9);
    border: 1px solid rgba(0, 255, 127, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--green);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

.purchase-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================
   Tasks Screen
   ============================ */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    transition: opacity 0.3s;
}

.task-card.completed {
    opacity: 0.4;
}

.task-icon {
    font-size: 22px;
    flex-shrink: 0;
}

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

.task-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-desc {
    font-size: 11px;
    color: var(--text-2);
}

.task-action {
    flex-shrink: 0;
}

.task-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    transition: 0.15s;
}

.task-btn:active {
    transform: scale(0.95);
}

.task-btn.claim {
    background: var(--accent);
    color: #000;
}

.task-btn.locked {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-2);
}

.task-done {
    font-size: 18px;
}

/* ============================
   Profile Screen
   ============================ */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
}

.profile-skin {
    width: 80px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.skin-body-img {
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    display: none;
}

.profile-name {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 600;
}

.profile-rank {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 600;
}

.stat-label {
    font-size: 10px;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-header {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 8px;
}

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

.settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.settings-item:active {
    background: rgba(255, 255, 255, 0.06);
}

.settings-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.settings-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.settings-label {
    font-size: 14px;
    font-weight: 500;
}

.settings-desc {
    font-size: 11px;
    color: var(--text-2);
}

.settings-arrow {
    color: var(--text-2);
    font-size: 20px;
    flex-shrink: 0;
}

.app-version {
    text-align: center;
    color: var(--text-2);
    font-size: 11px;
    margin-top: 20px;
    padding-bottom: 8px;
}

/* ============================
   Bottom Navbar
   ============================ */
.bottom-nav {
    height: var(--nav-h);
    min-height: var(--nav-h);
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
    flex-shrink: 0;
}

.bottom-nav.visible {
    display: flex;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-2);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 6px;
    -webkit-tap-highlight-color: transparent;
}

.nav-item svg {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 20px;
    height: 20px;
}

.nav-item span {
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active svg {
    transform: translateY(-2px) scale(1.08);
}

/* ============================
   Responsive
   ============================ */
@media (max-height: 600px) {
    .header {
        margin-bottom: 4px;
    }

    .mc-status {
        margin-bottom: 4px;
        padding: 5px 10px;
    }

    .coin-count {
        font-size: 26px;
    }

    .coin-icon {
        font-size: 16px;
    }

    .tap-circle {
        width: min(42vw, 160px);
        height: min(42vw, 160px);
    }

    .tap-logo {
        font-size: 18px;
    }

    .energy-footer {
        padding: 4px 0 0;
    }

    .energy-bar-container {
        height: 6px;
    }

    :root {
        --nav-h: 50px;
    }

    .nav-item svg {
        width: 18px;
        height: 18px;
    }

    .profile-skin {
        width: 60px;
        height: 90px;
    }
}