/* ===== СБРОС И БАЗА ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --app-max-width: 1200px;
    --menu-gap: 12px;
    --menu-cols: 3;
    --padding-main: 80px 20px 40px;
    --card-padding: 32px;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a14;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-particles {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(245, 200, 66, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(255, 107, 107, 0.03) 0%, transparent 50%);
}

body.phone-mode {
    --app-max-width: 100%;
    --menu-gap: 8px;
    --menu-cols: 2;
    --padding-main: 72px 10px 20px;
    --card-padding: 16px;
}
body.phone-mode .main-container { max-width: 100%; padding: var(--padding-main); }
body.phone-mode .menu-grid { grid-template-columns: repeat(var(--menu-cols), 1fr); gap: var(--menu-gap); max-width: 100%; }
body.phone-mode .menu-btn { padding: 14px 8px; }
body.phone-mode .menu-btn .icon { font-size: 22px; }
body.phone-mode .menu-btn .label { font-size: 11px; }
body.phone-mode .menu-btn .sub { font-size: 9px; }
body.phone-mode .menu-header h1 { font-size: 22px; }
body.phone-mode .menu-header .menu-logo { max-width: 120px; }
body.phone-mode .top-bar { padding: 8px 12px; }
body.phone-mode .top-bar .logo img { height: 24px; }
body.phone-mode .top-bar .balance { font-size: 12px; padding: 4px 10px; }
body.phone-mode .top-bar .username-display { font-size: 11px; }
body.phone-mode .top-bar .logout-btn { font-size: 10px; padding: 4px 10px; }
body.phone-mode .top-bar .avatar { width: 28px; height: 28px; font-size: 14px; }
body.phone-mode .page-title { font-size: 20px; }
body.phone-mode .profile-grid { grid-template-columns: 1fr; }
body.phone-mode .shop-grid { grid-template-columns: 1fr 1fr; }
body.phone-mode .inventory-grid { grid-template-columns: 1fr 1fr; }
body.phone-mode .upgrader-main-grid { grid-template-columns: 1fr; }
body.phone-mode .wheel-container { max-width: 280px; }
body.phone-mode .menu-footer { flex-wrap: wrap; gap: 6px; }
body.phone-mode .menu-footer .footer-btn { font-size: 10px; padding: 4px 8px; }
body.phone-mode .news-grid { grid-template-columns: 1fr; }
body.phone-mode .upgrader-header-buttons { flex-direction: column; align-items: stretch; }
body.phone-mode .upgrader-top-buttons { justify-content: center; }

/* ===== ПРЕЛОАДЕР ===== */
#pageLoader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0a0a14;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.3s ease;
}
#pageLoader.hidden {
    opacity: 0;
    pointer-events: none;
}
#pageLoader .loader-logo {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
#pageLoader .loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(245, 200, 66, 0.2);
    border-top-color: #f5c842;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}
@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

/* ===== УСТРОЙСТВО ===== */
.device-selector {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none; align-items: center; justify-content: center;
    padding: 20px; backdrop-filter: blur(20px);
}
.device-selector.visible { display: flex; }
.device-selector-content {
    max-width: 420px; width: 100%;
    background: rgba(26, 26, 46, 0.95);
    border-radius: 32px; padding: 40px 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center; animation: fadeSlideIn 0.3s ease;
}
.device-selector-content h2 {
    font-size: 24px; margin-bottom: 8px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.device-selector-content p { color: #8888aa; font-size: 14px; margin-bottom: 24px; }
.device-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.device-option {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px; padding: 24px 16px;
    cursor: pointer; transition: 0.2s;
}
.device-option:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); }
.device-option .icon { font-size: 48px; display: block; margin-bottom: 8px; }
.device-option .label { font-size: 16px; font-weight: 700; }
.device-option .sub { font-size: 12px; color: #8888aa; }

/* ===== АВТОРИЗАЦИЯ ===== */
.auth-container {
    position: relative; z-index: 1;
    width: 100%; max-width: 420px;
    margin: 0 auto; padding: 20px;
    min-height: 100vh;
    align-items: center; justify-content: center;
}
.auth-container.ready { display: flex; }
.auth-box {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 32px; padding: 40px 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%; max-height: 90vh; overflow-y: auto;
}
.auth-box::-webkit-scrollbar { width: 4px; }
.auth-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.auth-box .logo {
    text-align: center; font-size: 32px; font-weight: 900;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 8px;
}
.auth-box .subtitle { text-align: center; color: #8888aa; font-size: 14px; margin-bottom: 28px; }
.auth-tabs {
    display: flex; gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px; padding: 4px; margin-bottom: 24px;
}
.auth-tab {
    flex: 1; padding: 10px; border: none; border-radius: 12px;
    background: transparent; color: #8888aa;
    font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: 0.2s;
}
.auth-tab.active { background: linear-gradient(135deg, #f5c842, #f5a623); color: #0a0a14; }
.auth-tab:hover:not(.active) { color: #fff; }
.auth-form { display: none; animation: fadeSlideIn 0.3s ease; }
.auth-form.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 13px; font-weight: 600;
    color: #aaa; margin-bottom: 6px;
}
.form-group input {
    width: 100%; padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff; font-size: 15px;
    font-family: 'Inter', sans-serif; transition: 0.2s;
}
.form-group input:focus {
    outline: none; border-color: #f5c842;
    background: rgba(255, 255, 255, 0.08);
}
.form-group input::placeholder { color: #555; }
.form-group .hint { font-size: 11px; color: #666; margin-top: 4px; }

.btn-auth {
    width: 100%; padding: 14px;
    border: none; border-radius: 60px;
    font-family: 'Inter', sans-serif;
    font-size: 16px; font-weight: 700;
    cursor: pointer; transition: 0.2s; margin-top: 8px;
}
.btn-auth-primary {
    background: linear-gradient(135deg, #f5c842, #f5a623);
    color: #0a0a14;
    box-shadow: 0 4px 20px rgba(245, 200, 66, 0.25);
}
.btn-auth-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 200, 66, 0.35); }
.auth-error { color: #ff6b6b; font-size: 13px; text-align: center; margin-top: 12px; min-height: 20px; }
.auth-success { color: #4caf50; font-size: 13px; text-align: center; margin-top: 12px; min-height: 20px; }

/* ===== БЕТА-ЭКРАН ===== */
.beta-screen {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 20, 0.98);
    z-index: 3000;
    display: none; align-items: center; justify-content: center;
    padding: 20px; backdrop-filter: blur(20px);
}
.beta-screen.visible { display: flex; }
.beta-screen-content {
    max-width: 420px; width: 100%;
    background: rgba(26, 26, 46, 0.95);
    border-radius: 32px; padding: 40px 32px;
    border: 1px solid rgba(245, 200, 66, 0.2);
    text-align: center; animation: fadeSlideIn 0.3s ease;
}
.beta-screen-content h2 {
    font-size: 26px; margin-bottom: 8px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.beta-screen-content .beta-icon { font-size: 64px; display: block; margin-bottom: 12px; }
.beta-screen-content p { color: #8888aa; font-size: 14px; margin-bottom: 24px; }
.beta-screen-content input {
    width: 100%; padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff; font-size: 16px;
    font-family: 'Inter', sans-serif;
    text-align: center; letter-spacing: 1px;
    margin-bottom: 16px;
}
.beta-screen-content input:focus { outline: none; border-color: #f5c842; }
.beta-screen-content .beta-btn {
    width: 100%; padding: 14px;
    border: none; border-radius: 60px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    color: #0a0a14; font-size: 16px; font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: 0.2s;
}
.beta-error { color: #ff6b6b; font-size: 13px; margin-top: 12px; min-height: 20px; }

/* ===== TOP BAR ===== */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100; background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.top-bar .logo { font-size: 20px; font-weight: 900; text-decoration: none; }
.top-bar .logo img { height: 32px; width: auto; display: block; }
.top-bar .balance {
    display: flex; align-items: center; gap: 8px;
    background: rgba(76, 175, 80, 0.12);
    padding: 8px 16px; border-radius: 60px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: #4caf50; font-weight: 700; font-size: 16px;
    cursor: pointer; transition: 0.2s;
}
.top-bar .balance:hover { background: rgba(76, 175, 80, 0.2); }
.top-bar .balance::before { content: "₽"; font-size: 18px; }
.top-bar .user-info { display: flex; align-items: center; gap: 12px; }
.top-bar .username-display { color: #fff; font-weight: 600; font-size: 14px; }
.top-bar .logout-btn {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b6b; padding: 6px 14px; border-radius: 30px;
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.top-bar .logout-btn:hover { background: rgba(255, 107, 107, 0.25); }
.top-bar .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    cursor: pointer; transition: 0.2s;
}
.top-bar .avatar:hover { transform: scale(1.05); }

.main-site { display: none; }
.main-site.visible { display: block; }
.main-container {
    position: relative; z-index: 1;
    max-width: var(--app-max-width);
    margin: 0 auto; padding: var(--padding-main);
}

/* ===== МЕНЮ ===== */
.menu-screen { display: block; }
.menu-screen.hidden { display: none; }
.menu-header { text-align: center; margin-bottom: 30px; }
.menu-header .menu-logo {
    max-width: 160px; height: auto;
    margin-bottom: 12px; border-radius: 16px;
}
.menu-header h1 {
    font-size: 28px; font-weight: 800;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 4px;
}
.menu-header p { color: #8888aa; font-size: 14px; }
.menu-grid {
    display: grid;
    grid-template-columns: repeat(var(--menu-cols), 1fr);
    gap: var(--menu-gap); max-width: 600px; margin: 0 auto;
}
.menu-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px; padding: 20px 12px;
    text-align: center; cursor: pointer;
    transition: 0.2s; color: #fff;
    text-decoration: none;
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
}
.menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}
.menu-btn .icon { font-size: 28px; display: block; }
.menu-btn .label { font-size: 13px; font-weight: 600; }
.menu-btn .sub { font-size: 10px; color: #666; }
.menu-btn .badge {
    font-size: 9px; color: #f5c842;
    background: rgba(245, 200, 66, 0.15);
    padding: 2px 10px; border-radius: 12px;
    margin-top: 2px;
}
.menu-btn.news-btn {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(162, 155, 254, 0.2));
    border-color: rgba(108, 92, 231, 0.3);
}
.menu-btn.news-btn:hover {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(162, 155, 254, 0.3));
}
.menu-btn.deposit {
    background: linear-gradient(135deg, rgba(45, 125, 70, 0.2), rgba(26, 92, 50, 0.2));
    border-color: rgba(76, 175, 80, 0.3);
}
.menu-btn.deposit:hover { background: linear-gradient(135deg, rgba(45, 125, 70, 0.3), rgba(26, 92, 50, 0.3)); }
.menu-btn.withdraw {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
}
.menu-btn.withdraw:hover {
    transform: translateY(-2px);
    background: rgba(255, 107, 107, 0.25);
}

.menu-footer {
    margin-top: 24px;
    display: flex; justify-content: center;
    gap: 8px; flex-wrap: wrap;
}
.menu-footer .footer-btn {
    background: none; border: none;
    color: #555; font-size: 12px;
    cursor: pointer; transition: 0.2s;
    font-family: 'Inter', sans-serif;
    padding: 4px 12px; border-radius: 20px;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.menu-footer .footer-btn:hover { color: #8888aa; background: rgba(255, 255, 255, 0.05); }
.menu-footer .footer-btn .icon { font-size: 14px; }
/* ===== СТРАНИЦЫ ===== */
.page { display: none; animation: fadeSlideIn 0.3s ease; }
.page.active { display: block; }
.page-title {
    font-size: 28px; font-weight: 800; margin-bottom: 24px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.back-btn {
    background: none; border: none; color: #8888aa;
    font-size: 14px; cursor: pointer;
    margin-bottom: 16px; padding: 6px 0;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Inter', sans-serif;
    transition: 0.2s;
    text-decoration: none;
}
.back-btn:hover { color: #fff; }

/* ===== НОВОСТИ ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.news-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.2s;
}
.news-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.news-card .news-image {
    width: 100%; height: 200px;
    object-fit: cover; display: block;
    background: rgba(0, 0, 0, 0.3);
}
.news-card .news-body { padding: 20px; }
.news-card .news-title {
    font-size: 18px; font-weight: 700;
    margin-bottom: 8px; color: #f5c842;
}
.news-card .news-text {
    font-size: 14px; color: #b3b3b3;
    line-height: 1.6; margin-bottom: 12px;
}
.news-card .news-date {
    font-size: 11px; color: #666; font-family: monospace;
}
.news-empty {
    text-align: center; color: #8888aa;
    padding: 80px 20px; font-size: 16px;
}

/* ===== ПРОЧЕЕ / ПРОМОКОД ===== */
.other-container { max-width: 500px; margin: 0 auto; }
.other-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px; padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.other-card .promo-icon { font-size: 64px; display: block; margin-bottom: 16px; }
.other-card h2 {
    font-size: 24px; font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.other-card p { color: #8888aa; font-size: 14px; margin-bottom: 24px; }
.other-card input {
    width: 100%; padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff; font-size: 16px;
    font-family: 'Inter', sans-serif;
    text-align: center; letter-spacing: 2px;
    font-weight: 700; text-transform: uppercase;
    margin-bottom: 16px;
}
.other-card input:focus { outline: none; border-color: #f5c842; }
.other-card .promo-btn {
    width: 100%; padding: 16px;
    border: none; border-radius: 60px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    color: #0a0a14; font-size: 16px; font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: 0.2s;
    box-shadow: 0 4px 20px rgba(245, 200, 66, 0.25);
}
.other-card .promo-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 200, 66, 0.35); }
.other-card .promo-result { margin-top: 16px; min-height: 24px; font-size: 14px; text-align: center; }

/* ===== ПРОФИЛЬ ===== */
.profile-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px; padding: var(--card-padding);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.profile-card .avatar { font-size: 80px; margin-bottom: 12px; }
.profile-card .name { font-size: 24px; font-weight: 700; }
.profile-card .id { font-size: 14px; color: #8888aa; margin-bottom: 16px; }
.profile-card .id .user-id { color: #f5c842; font-weight: 700; font-family: monospace; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.profile-stat { background: rgba(255, 255, 255, 0.04); padding: 16px; border-radius: 16px; }
.profile-stat .num { font-size: 24px; font-weight: 700; color: #4caf50; }
.profile-stat .label { font-size: 12px; color: #8888aa; margin-top: 4px; }

.inventory-section { margin-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 24px; }
.inventory-section h3 { font-size: 18px; margin-bottom: 16px; color: #8888aa; }
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.inventory-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px; padding: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.2s; position: relative;
}
.inventory-item:hover { border-color: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.inventory-item .item-image { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; margin-bottom: 4px; }
.inventory-item .item-name { font-size: 12px; font-weight: 600; }
.inventory-item .item-rarity { font-size: 10px; font-weight: 600; }
.inventory-item .item-price { font-size: 12px; color: #4caf50; font-weight: 600; }
.inventory-item .item-count {
    position: absolute; top: -8px; right: -8px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    color: #0a0a14; font-size: 12px; font-weight: 700;
    padding: 2px 10px; border-radius: 20px;
    min-width: 24px; text-align: center;
    box-shadow: 0 2px 10px rgba(245, 200, 66, 0.3);
}
.inventory-item .sell-btn {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(255, 107, 107, 0.2);
    border: none; color: #ff6b6b;
    width: 28px; height: 28px;
    border-radius: 50%; cursor: pointer;
    font-size: 14px; transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.inventory-item .sell-btn:hover { background: rgba(255, 107, 107, 0.4); }
.inventory-empty { grid-column: 1 / -1; text-align: center; color: #8888aa; padding: 40px 0; }

/* ===== МАГАЗИН ===== */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.shop-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px; padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.3s;
}
.shop-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.shop-item .item-image { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; margin: 0 auto 10px; display: block; }
.shop-item .item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.shop-item .item-rarity { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.shop-item .item-price { font-size: 16px; color: #4caf50; font-weight: 700; margin-bottom: 8px; }
.shop-item .item-controls { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.shop-item .item-controls button {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff; font-size: 16px; cursor: pointer;
    transition: 0.2s; display: flex;
    align-items: center; justify-content: center;
    font-family: 'Inter', sans-serif;
}
.shop-item .item-controls button:hover { background: rgba(255, 255, 255, 0.1); }
.shop-item .item-controls .quantity {
    font-size: 16px; font-weight: 700;
    min-width: 30px; text-align: center; color: #f5c842;
}
.shop-item .buy-btn {
    padding: 8px 24px;
    border: none; border-radius: 30px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: #fff; font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 700;
    cursor: pointer; transition: 0.2s; width: 100%;
}
.shop-item .buy-btn:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3); }
.shop-item .buy-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.shop-total { text-align: right; padding: 16px 0; color: #8888aa; font-size: 14px; }
.shop-total span { color: #f5c842; font-weight: 700; }
.shop-actions { display: flex; gap: 12px; justify-content: flex-end; margin-bottom: 16px; }
.shop-actions .btn-small {
    padding: 8px 20px; border: none; border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff; font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.shop-actions .btn-small:hover { background: rgba(255, 255, 255, 0.1); }

/* ===== НАСТРОЙКИ ===== */
.settings-container { max-width: 600px; margin: 0 auto; }
.settings-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px; padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}
.settings-card h3 { font-size: 16px; color: #f5c842; margin-bottom: 12px; }
.settings-card .setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.settings-card .setting-row:last-child { border-bottom: none; }
.settings-card .setting-row .label { color: #aaa; font-size: 14px; }
.settings-card .setting-row .toggle {
    width: 48px; height: 28px; border-radius: 14px;
    background: #2a2a44; border: none;
    cursor: pointer; transition: 0.3s; position: relative;
}
.settings-card .setting-row .toggle.active { background: linear-gradient(135deg, #f5c842, #f5a623); }
.settings-card .setting-row .toggle::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; transition: 0.3s;
}
.settings-card .setting-row .toggle.active::after { left: 23px; }
.settings-card .setting-btn {
    padding: 8px 20px; border: none; border-radius: 30px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff; font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 700;
    cursor: pointer; transition: 0.2s;
    text-decoration: none; display: inline-block;
}
.settings-card .setting-btn:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3); }
.settings-version { text-align: center; color: #444; font-size: 12px; margin-top: 20px; font-family: monospace; }

/* ===== АПГРЕЙДЕР ===== */
.app-upgrader { max-width: 1100px; width: 100%; margin: 0 auto; }
.upgrader-main-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 20px; align-items: start; }
.upgrader-left, .upgrader-right {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px; padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.panel-title { font-size: 14px; font-weight: 600; color: #8888aa; margin-bottom: 12px; text-align: center; }
.selected-skin-display {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px; padding: 16px;
    text-align: center; margin-bottom: 12px;
    min-height: 120px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.selected-skin-display img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; margin-bottom: 8px; }
.selected-skin-display .skin-name { font-weight: 700; font-size: 14px; }
.selected-skin-display .skin-rarity { font-size: 12px; font-weight: 600; }
.selected-skin-display .skin-price { font-size: 13px; color: #4caf50; font-weight: 600; }
.selected-skin-display .no-selection { color: #8888aa; font-size: 14px; }

.skin-list { max-height: 250px; overflow-y: auto; padding-right: 4px; }
.skin-list::-webkit-scrollbar { width: 4px; }
.skin-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 4px; }
.skin-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.skin-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px; margin-bottom: 6px;
    cursor: pointer; transition: 0.2s;
    border: 2px solid transparent;
}
.skin-item:hover { background: rgba(255, 255, 255, 0.06); }
.skin-item.active { border-color: #f5c842; background: rgba(245, 200, 66, 0.08); }
.skin-item .skin-icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.skin-item .skin-info { flex: 1; }
.skin-item .skin-info .name { font-weight: 600; font-size: 13px; }
.skin-item .skin-info .rarity { font-size: 10px; font-weight: 600; }
.skin-item .skin-price { font-weight: 700; color: #4caf50; font-size: 12px; }
.skin-item .selected-badge { color: #f5c842; font-size: 16px; }
.skin-empty { text-align: center; color: #8888aa; padding: 30px 0; font-size: 14px; }

.upgrader-center { display: flex; flex-direction: column; align-items: center; }
.wheel-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: #f5c842; }

/* ===== КОЛЕСО + СТРЕЛКА ЗА КОЛЕСОМ ===== */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1/1;
    z-index: 1;
}
.wheel-container canvas {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}
.pointer-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    z-index: 1;
    transform-origin: center center;
}
.pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid #ff6b6b;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 107, 0.8));
    z-index: 1;
}

.wheel-center-info {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; text-align: center;
    pointer-events: none;
}
.wheel-center-info .chance-value {
    font-size: 32px; font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}
.wheel-center-info .chance-label { font-size: 12px; color: #8888aa; }

.speed-controls { display: flex; gap: 8px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.speed-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    color: #8888aa;
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: 0.2s;
}
.speed-btn:hover { background: rgba(255, 255, 255, 0.06); }
.speed-btn.active { border-color: #f5c842; background: rgba(245, 200, 66, 0.1); color: #f5c842; }
.speed-btn .speed-label { display: block; font-size: 9px; font-weight: 400; opacity: 0.5; }

.upgrade-btn {
    margin-top: 12px;
    padding: 14px 48px;
    border: none; border-radius: 60px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    color: #0a0a14;
    font-family: 'Inter', sans-serif;
    font-size: 18px; font-weight: 700;
    cursor: pointer; transition: 0.2s;
    box-shadow: 0 4px 20px rgba(245, 200, 66, 0.25);
    width: 100%; max-width: 280px;
}
.upgrade-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 200, 66, 0.35); }
.upgrade-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.upgrade-result { margin-top: 12px; text-align: center; font-size: 14px; min-height: 24px; color: #b3b3ff; }
.upgrade-result.success { color: #4caf50; }
.upgrade-result.fail { color: #ff6b6b; }

.result-skin-display {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px; padding: 16px;
    text-align: center; min-height: 150px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.result-skin-display img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; margin-bottom: 8px; }
.result-skin-display .skin-name { font-weight: 700; font-size: 14px; }
.result-skin-display .skin-rarity { font-size: 12px; font-weight: 600; }
.result-skin-display .skin-price { font-size: 13px; color: #4caf50; font-weight: 600; }
.result-skin-display .no-result { color: #8888aa; font-size: 14px; }
.result-skin-display .multiplier-info { font-size: 12px; color: #f5c842; margin-top: 4px; font-weight: 600; }

.chance-selector-right { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.chance-selector-right .chance-label { font-size: 12px; color: #8888aa; text-align: center; margin-bottom: 10px; }
.chance-selector-right .chance-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
.chance-selector-right .chance-btn-small {
    padding: 8px 4px; border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #8888aa;
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 700;
    cursor: pointer; transition: 0.2s;
    text-align: center;
}
.chance-selector-right .chance-btn-small:hover { background: rgba(255, 255, 255, 0.06); }
.chance-selector-right .chance-btn-small.active { border-color: #f5c842; background: rgba(245, 200, 66, 0.1); color: #f5c842; }
.chance-selector-right .chance-btn-small .multiplier { display: block; font-size: 8px; font-weight: 400; opacity: 0.5; }
.chance-selector-right .custom-chance-input { display: flex; align-items: center; gap: 6px; margin-top: 8px; justify-content: center; }
.chance-selector-right .custom-chance-input input {
    width: 60px; padding: 6px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: #fff; font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 600; text-align: center;
}
.chance-selector-right .custom-chance-input input:focus { outline: none; border-color: #f5c842; }
.chance-selector-right .custom-chance-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.chance-selector-right .custom-chance-input .apply-btn {
    padding: 4px 12px; border: none; border-radius: 20px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff; font-family: 'Inter', sans-serif;
    font-size: 11px; font-weight: 700;
    cursor: pointer; transition: 0.2s;
}
.chance-selector-right .custom-chance-input .apply-btn:hover { transform: scale(1.05); }
.chance-selector-right .current-chance-display { text-align: center; margin-top: 8px; font-size: 14px; color: #b3b3ff; }
.chance-selector-right .current-chance-display .highlight { font-weight: 900; font-size: 18px; }

.upgrader-header-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.upgrader-top-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.upgrader-top-buttons .btn-small {
    padding: 8px 16px;
    border: none; border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.upgrader-top-buttons .btn-small:hover { background: rgba(255, 255, 255, 0.1); }
.upgrader-top-buttons .btn-error {
    background: rgba(136, 136, 170, 0.08);
    border-color: rgba(136, 136, 170, 0.15);
    color: #8888aa; font-size: 11px;
}
.upgrader-top-buttons .btn-error:hover { background: rgba(136, 136, 170, 0.15); color: #b3b3d1; }

.custom-chance-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.custom-chance-toggle {
    width: 100%; padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #8888aa;
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    transition: 0.2s;
}
.custom-chance-toggle:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.custom-chance-toggle .custom-chance-arrow { font-size: 10px; transition: transform 0.3s; }
.custom-chance-toggle.open .custom-chance-arrow { transform: rotate(180deg); }
.custom-chance-content {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 4px;
}
.custom-chance-content.open { max-height: 100px; padding: 12px 4px 4px; }

/* ===== МОБИЛЬНЫЙ АПГРЕЙДЕР ===== */
.upgrader-mobile-wrap {
    display: none;
    flex-direction: column;
    gap: 16px;
}
.upgrader-wheel-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.upgrader-wheel-block .wheel-container { max-width: 340px; }
.upgrader-speed-block {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.upgrader-action-block {
    display: flex;
    justify-content: center;
}
.upgrader-action-block .upgrade-btn { max-width: 100%; }
.upgrader-chance-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 20px;
}
.upgrader-chance-block .chance-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.upgrader-chance-block .chance-btn-small {
    padding: 12px 4px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #8888aa;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}
.upgrader-chance-block .chance-btn-small:hover { background: rgba(255, 255, 255, 0.06); }
.upgrader-chance-block .chance-btn-small.active { border-color: #f5c842; background: rgba(245, 200, 66, 0.1); color: #f5c842; }
.upgrader-chance-block .chance-btn-small .multiplier { display: block; font-size: 9px; font-weight: 400; opacity: 0.6; margin-top: 2px; }
.upgrader-chance-block .current-chance-display { text-align: center; font-size: 14px; color: #b3b3ff; margin-top: 12px; }
.upgrader-chance-block .current-chance-display .highlight { font-weight: 900; font-size: 20px; }
.upgrader-chance-block .current-chance-display .mult-info { font-size: 12px; color: #8888aa; display: block; margin-top: 2px; }
.upgrader-result-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 20px;
}
.upgrader-result-block .panel-title { margin-bottom: 14px; }
.upgrader-skin-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 20px;
}
.upgrader-skin-block .skin-list { max-height: 300px; }

@media (max-width: 900px) {
    .upgrader-main-grid { display: none; }
    .upgrader-mobile-wrap { display: flex; }
}

/* ===== РАЗРАБОТКА ===== */
.development-container { text-align: center; padding: 60px 20px; }
.development-container .dev-icon { font-size: 80px; margin-bottom: 20px; display: block; }
.development-container .dev-title {
    font-size: 32px; font-weight: 800; margin-bottom: 12px;
    background: linear-gradient(135deg, #f5c842, #f5a623);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.development-container .dev-text { color: #8888aa; font-size: 16px; max-width: 500px; margin: 0 auto; line-height: 1.6; }
.development-container .dev-progress { margin-top: 30px; display: flex; justify-content: center; gap: 12px; }
.development-container .dev-progress .dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: #2a2a44; animation: dotPulse 1.5s infinite;
}
.development-container .dev-progress .dot:nth-child(2) { animation-delay: 0.3s; }
.development-container .dev-progress .dot:nth-child(3) { animation-delay: 0.6s; }
.development-container .dev-progress .dot:nth-child(4) { animation-delay: 0.9s; }
.development-container .dev-progress .dot:nth-child(5) { animation-delay: 1.2s; }

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; background: #2a2a44; }
    50% { transform: scale(1.5); opacity: 1; background: #f5c842; }
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
    .upgrader-main-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .auth-box { padding: 28px 20px; }
    .shop-grid { grid-template-columns: 1fr 1fr; }
    .inventory-grid { grid-template-columns: 1fr 1fr; }
    .wheel-container { max-width: 280px; }
    .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr; }
    .device-options { grid-template-columns: 1fr; }
}