* {
    /* last updated */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Exo 2', sans-serif;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    background: #6c757d; /* основной фон */
    user-select:none;
    /* touch-action: manipulation; */
}
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* фон остаётся на заднем плане */
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle 0.3s infinite alternate;
}


@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* Экраны */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px 0px 90px;
    background: transparent;
    overflow-y: auto;
    z-index: -1;
    align-items: center;
	background: #222324; 
}
.upgrade-item,
.leader-card,
.task-card,
.glass-card,
.boost-card {
    touch-action: manipulation;
    cursor: pointer;
}


.screen.active {
    display: flex;
    visibility: visible;
}

/* Главный экран */
#home-screen {
    flex-direction: column;
    padding-top: 40px;
    justify-content: end;
   width: 100%;
}

.header {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;

}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #6ee7ff, #a855f7, #ff6b9d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(110, 231, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.game-subtitle {
    font-size: 1rem;
    color: #a5b4fc;
    opacity: 0.9;
}

/* Лунный контейнер */
.moon-container {
    position: relative;
    width: 380px;
    height: 380px;
    margin: 40px auto 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: float 6s ease-in-out infinite;

}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.moon {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #f0f0f0, #c0c0c0, #888888);
    border-radius: 50%;
    box-shadow:
            0 0 60px rgba(255, 255, 255, 0.8),
            0 0 100px rgba(168, 85, 247, 0.6),
            inset -20px -20px 40px rgba(0, 0, 0, 0.3),
            inset 10px 10px 30px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.crater {
    position: absolute;
    background: radial-gradient(circle, #999, #777);
    border-radius: 50%;
    opacity: 0.7;
}

.crater1 { width: 40px; height: 40px; top: 20%; left: 25%; }
.crater2 { width: 30px; height: 30px; top: 40%; left: 60%; }
.crater3 { width: 50px; height: 50px; top: 65%; left: 30%; }
.crater4 { width: 25px; height: 25px; top: 30%; left: 70%; }
.crater5 { width: 35px; height: 35px; top: 70%; left: 65%; }

/* Эффект тапа */
.tap-effect {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    z-index: 1000;
}

@keyframes tapAnimation {
    0% { transform: scale(0); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Статистика */
.stats-container-main {
    width: 90%;
    max-width: 600px;
    margin: 20px auto 0;
    padding: 12px 14px;
    background: rgba(16, 16, 40, 0.56);
    border-radius: 14px;
    border: 1px solid rgba(94, 7, 255, 0.25);
}
.stats-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto 0;
    padding: 12px 14px;
    background: rgba(16, 16, 40, 0.56);
    border-radius: 14px;
    border: 1px solid rgba(94, 7, 255, 0.25);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.stat-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.stat-label {
    font-size: 1.2rem;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 1.3rem;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6ee7ff;
    text-shadow: 0 0 10px rgba(110, 231, 255, 0.7);
}

.stat-value-energy{
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #6ee7ff;
    text-align: right;
    text-shadow: 0 0 10px rgba(110, 231, 255, 0.7);
}

.level-container {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
}

.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
}

.level-label {
    color: #a5b4fc;
}

.level-value {
    font-family: 'Orbitron', sans-serif;
    color: #ff6b9d;
    font-weight: 700;
}

.level-bar {
    height: 10px;
    background: rgba(16, 16, 40, 0.7);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, #6ee7ff, #a855f7);
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

/* Кнопки улучшений (основные) */
.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 90%;
    max-width: 600px;
    margin: 20px auto;
    position: relative; /* Добавьте */
    z-index: 100; /* Добавьте */
}


.action-btn {
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.6);
}

.action-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Апгрейды */
#upgrades-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 0;
}

/* ===== Upgrade Card ===== */
.upgrade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(
        180deg,
        rgba(24, 24, 60, 0.9),
        rgba(16, 16, 40, 0.9)
    );
    backdrop-filter: blur(14px);

    border-radius: 18px;
    padding: 12px;
    margin-bottom: 14px;

    border: 1px solid rgba(110, 231, 255, 0.15);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);

    transition: all 0.25s ease;
}

.upgrades-list-container {
    max-width: 600px;
    margin: 20px auto;
}

.upgrade-item:hover {
    transform: translateY(-4px);
    border-color: rgba(110, 231, 255, 0.5);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(110, 231, 255, 0.15);
}

/* ===== Left Side ===== */
.upgrade-info {
    flex: 1;
    padding-right: 14px;
    padding-left: 6px;
}

.upgrade-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.upgrade-desc {
    font-size: 0.85rem;
    color: #9aa4ff;
    opacity: 0.85;
    margin-bottom: 8px;
}

/* ===== Cost ===== */
.upgrade-cost {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ff9bd5;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Button ===== */
.upgrade-button {
    min-width: 96px;
    height: 38px;

    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    border: none;
    border-radius: 12px;

    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;

    cursor: pointer;
    transition: all 0.25s ease;

    box-shadow:
        0 6px 16px rgba(168, 85, 247, 0.45),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.upgrade-button:hover:not(:disabled) {
    transform: scale(1.07);
    box-shadow:
        0 8px 22px rgba(168, 85, 247, 0.7),
        0 0 12px rgba(110, 231, 255, 0.6);
}

.upgrade-button:active:not(:disabled) {
    transform: scale(0.95);
}

/* ===== Disabled ===== */
.upgrade-button:disabled {
    background: linear-gradient(135deg, #2c2c44, #1f1f33);
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    display: flex;
    justify-content: center;
}

.bottom-nav-content {
    max-width: 600px;
    background: rgba(16, 16, 40, 0.567);
    border: 1px solid rgba(94, 7, 255, 0.25);
    border-radius: 18px;
    z-index: 1000;
    justify-content: space-around;
    isolation: isolate;
    will-change: transform;
    backface-visibility: hidden;
    display: flex;
    width: 100%;
    padding: 4px;
}

.bottom-nav a {
    text-align: center;
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
}

.bottom-nav a .nav-icon {
    line-height: 24px;
    margin-bottom: 0;
    height: 38px;
    width: 28px;
    fill: #fff;
    display: flex;
    align-items: center;
}

.bottom-nav a.active .nav-icon {
    fill: #a5b4fc;
}

.bottom-nav a.active {
    opacity: 1;
    color: #a5b4fc;
}

.bottom-nav a:hover {
    opacity: 1;
}

.bottom-nav a.active div {
    animation: navPulse 1s infinite;
}

.bottom-nav a div {
    font-size: 1.6rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.bottom-nav a span {
    font-size: 0.75rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-nav a:active {
    transform: scale(0.95);
}

.bottom-nav img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.screen-content {
    width: 90%;
    max-width: 600px;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

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

#leaders-screen, #upgrades-screen, #tasks-screen {
    flex-direction: column;
}

/* Стили для других экранов */
#tasks-screen .task-card,
#leaders-screen .leader-card {
    background: rgba(16, 16, 40, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

#leaders-screen .king-card {
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    color: #000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(110, 231, 255, 0.5);
}

/* Энергия */
.energy-container {
    width: 100%;
    max-width: 600px;
    margin: 10px 0;
}


/* Анимации текста */
@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-60px) scale(1.5); opacity: 0; }
}

.floating-text {
    position: absolute;
    font-weight: 900;
    pointer-events: none;
    z-index: 2000;
    animation: floatUp 0.8s ease-out forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }

    .moon-container {
        width: 220px;
        height: 220px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .nav-item {
        font-size: 0.7rem;
        padding: 5px;
    }

    .nav-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.6rem;
    }

    .moon-container {
        width: 280px;
        height: 280px;
    
    }

    .stats-container {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

.leader-card {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 10px;
}

.leader-position {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(16, 16, 40, 0.7);
    backdrop-filter: blur(10px);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	
    margin-right: 15px; /* Увеличиваем отступ */
    flex-shrink: 0; /* Запрещаем сжиматься */
}
.leader-card {
    background: rgba(16, 16, 40, 0.56);
    border: 1px solid #9aa4ff;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex; /* Добавляем это */
    align-items: center; /* Выравниваем по вертикали */
}


.leader-card.leader-you {
    border-color: #6ee7ff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.leader-content {
    flex-grow: 1; /* Занимает все доступное пространство */
}

.progress {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-gradient {
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    border-radius: 6px;
    transition: width 0.3s ease;
}
/* Общий glass-стиль как у апгрейдов */
.glass-card {
    background: rgba(16, 16, 40, 0.56);
    backdrop-filter: blur(12px);
    border: 1px solid #9aa4ff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    transition: all 0.25s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.25);
}

/* Заголовок задания */
.task-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

/* Описание */
.task-desc {
    font-size: 0.85rem;
    color: #a5b4fc;
    margin-bottom: 10px;
}

/* Награда */
.task-reward {
    font-weight: 700;
    color: #6ee7ff;
}

/* Требования */
.task-requirements {
    font-size: 0.8rem;
    color: #c7d2fe;
    margin-bottom: 6px;
}

/* Прогресс */
.task-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.task-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    transition: width 0.3s ease;
}

/* Кнопки */
.task-btn {
    min-width: 90px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    transition: all 0.2s ease;
}

/* Primary (Claim) */
.task-btn.primary {
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    color: #fff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.task-btn.primary:hover:not(:disabled) {
    transform: scale(1.05);
}

/* Secondary (Go / Invite) */
.task-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #c7d2fe;
    border: 1px solid rgba(154, 164, 255, 0.4);
}

.task-btn.secondary:hover:not(:disabled) {
    background: rgba(154, 164, 255, 0.15);
}

/* Disabled */
.task-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#tg-user-box {
    position: absolute;
    /* top: 10vh; 3% от высоты экрана */
    /* left: 3.5vw; 3% от ширины экрана */
    display: flex;
    align-items: center;
    gap: 8px;
    left:20px;
    margin-top: 10px;
    /* padding: 6px 10px; */
    border-radius: 12px;
    z-index: 100;
    backdrop-filter: blur(8px);

}

#tg-user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #6ee7ff;
    box-shadow: 0 0 10px #6ee7ff;
}

#tg-user-name {
    color: #6ee7ff;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(110, 231, 255, 0.8), 0 0 12px rgba(110, 231, 255, 0.6);
}

.wg-shake { animation: wg-shake 0.18s linear; }

@keyframes wg-shake {
    0% { transform: translate(0,0); }
    25% { transform: translate(-6px, 4px); }
    50% { transform: translate(6px, -4px); }
    75% { transform: translate(-3px, 2px); }
    100% { transform: translate(0,0); }
}
.energy-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(26, 26, 58, 0.9);
    border: 1px solid rgba(110, 231, 255, 0.3);
    border-radius: 12px;
    padding: 10px 15px;
    z-index: 1000;
    min-width: 180px;
    backdrop-filter: blur(10px);
}

.energy-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.energy-icon {
    font-size: 18px;
    color: #6ee7ff;
}

.energy-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.energy-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.energy-bar {
    flex-grow: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #6ee7ff, #4a9eff);
    border-radius: 5px;
    width: 100%;
    transition: width 0.3s ease;
}

.energy-count {
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

.energy-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
    width: 100%;
    padding: 0 10px;
    margin-top: 5px;
}

.energy-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #6ee7ff;
    text-shadow: 0 0 10px rgba(110, 231, 255, 0.7);
    text-align: left;
}

.energy-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #6ee7ff;
    text-shadow: 0 0 10px rgba(110, 231, 255, 0.7);
    text-align: right;
}

/* Cosmic Modal Styles */
.cosmic-modal {
    background: rgba(16, 16, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(110, 231, 255, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 0 40px rgba(110, 231, 255, 0.2),
        0 0 80px rgba(168, 85, 247, 0.1),
        inset 0 0 40px rgba(110, 231, 255, 0.05);
    overflow: hidden;
    position: relative;
    margin-top: 80px;
}

.cosmic-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(110, 231, 255, 0.8) 50%, 
        transparent 100%);
    z-index: 1;
}

.cosmic-modal-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* 3 колонки */
    align-items: center;
    padding: 30px 40px 20px;
    background: linear-gradient(180deg, 
        rgba(110, 231, 255, 0.1) 0%, 
        rgba(16, 16, 40, 0.1) 100%);
    border-bottom: 1px solid rgba(110, 231, 255, 0.2);
}

.modal-title-wrapper {
    grid-column: 2;
    text-align: center;
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6ee7ff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 5px 0;
    text-shadow: 0 0 20px rgba(110, 231, 255, 0.5);
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.btn-close-cosmic {
    grid-column: 3;
    justify-self: end; /* Выравниваем по правому краю */
    align-self: start;
    background: rgba(16, 16, 40, 0.8);
    border: 1px solid rgba(110, 231, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-close-cosmic:hover {
    opacity: 1;
    border-color: #6ee7ff;
    background: rgba(110, 231, 255, 0.1);
    transform: rotate(90deg);
}

.cosmic-modal-body {
    padding: 30px;
    background: rgba(10, 10, 30, 0.5);
}

.loading-spinner {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(110, 231, 255, 0.1);
    border-top: 3px solid #6ee7ff;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.cosmic-modal-footer {
    background: linear-gradient(180deg, 
        rgba(16, 16, 40, 0.1) 0%, 
        rgba(110, 231, 255, 0.05) 100%);
    border-top: 1px solid rgba(110, 231, 255, 0.2);
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mining-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(16, 16, 40, 0.6);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(110, 231, 255, 0.1);
}



.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-cosmic {
    flex: 1;
    padding: 15px 20px;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-cosmic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.7s ease;
}

.btn-cosmic:hover::before {
    left: 100%;
}

.btn-cosmic-secondary {
    background: rgba(16, 16, 40, 0.8);
    color: #6ee7ff;
    border: 1px solid rgba(110, 231, 255, 0.3);
}

.btn-cosmic-secondary:hover {
    background: rgba(110, 231, 255, 0.1);
    border-color: #6ee7ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(110, 231, 255, 0.2);
}

.btn-cosmic-primary {
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.2), rgba(168, 85, 247, 0.2));
    color: white;
    border: 1px solid rgba(110, 231, 255, 0.5);
    position: relative;
}

.btn-cosmic-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 11px;
    padding: 1px;
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-cosmic-primary:hover {
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.3), rgba(168, 85, 247, 0.3));
    border-color: #6ee7ff;
    transform: translateY(-2px);
    box-shadow: 
        0 5px 20px rgba(110, 231, 255, 0.3),
        0 0 30px rgba(168, 85, 247, 0.2);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-cosmic:hover .btn-icon {
    transform: scale(1.2);
}

.price-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    border: 2px solid rgba(16, 16, 40, 0.9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Mining info cards inside modal */
.mining-level-card {
    background: rgba(16, 16, 40, 0.6);
    border: 1px solid rgba(110, 231, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.mining-level-card.current {
    border-color: #6ee7ff;
    box-shadow: 0 0 20px rgba(110, 231, 255, 0.3);
}

.mining-level-card.next {
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.mining-level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(110, 231, 255, 0.5), 
        transparent);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6ee7ff;
}

.card-badge {
    background: rgba(110, 231, 255, 0.1);
    color: #6ee7ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(110, 231, 255, 0.3);
}

.mining-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.detail-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: white;
}

.detail-value.highlight {
    color: #6ee7ff;
    text-shadow: 0 0 10px rgba(110, 231, 255, 0.7);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-featured {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(110, 231, 255, 0.5),
                    0 0 50px rgba(110, 231, 255, 0.3),
                    inset 0 0 20px rgba(110, 231, 255, 0.1);
        border-color: #6ee7ff;
    }
    50% { 
        box-shadow: 0 0 40px rgba(110, 231, 255, 0.8),
                    0 0 80px rgba(110, 231, 255, 0.5),
                    inset 0 0 30px rgba(110, 231, 255, 0.2);
        border-color: #4a9eff;
    }
}

@keyframes pulse-badge {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.8);
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .cosmic-modal-header,
    .cosmic-modal-body,
    .cosmic-modal-footer {
        padding: 20px;
    }
    
    .mining-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}
/* Boosts Grid */
.boosts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.boost-card {
    background: rgba(16, 16, 40, 0.7);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(110, 231, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.boost-card:hover {
    transform: translateY(-5px);
    border-color: #6ee7ff;
    box-shadow: 0 10px 25px rgba(110, 231, 255, 0.2);
}

.boost-card.vip {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(16, 16, 40, 0.7), rgba(255, 215, 0, 0.1));
}

.boost-card.lottery {
    border-color: rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(16, 16, 40, 0.7), rgba(168, 85, 247, 0.1));
}

.boost-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.boost-icon {
    font-size: 2rem;
    background: rgba(110, 231, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boost-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #6ee7ff;
    flex-grow: 1;
}

.boost-duration {
    background: rgba(110, 231, 255, 0.1);
    color: #6ee7ff;
    padding: 4px 8px;
    text-align: center;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(110, 231, 255, 0.3);
}

.boost-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.boost-benefits {
    margin: 15px 0;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.benefit-icon {
    color: #6ee7ff;
    font-weight: bold;
    margin-top: 2px;
}

.benefit-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.3;
}

.boost-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(110, 231, 255, 0.1);
}

.boost-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffd700;
}

.price-locked {
    color: rgba(255, 255, 255, 0.5);
}

.price-amount {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.boost-buy-btn {
    background: linear-gradient(135deg, #6ee7ff, #a855f7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.boost-buy-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(110, 231, 255, 0.4);
}

.boost-buy-btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

/* Balance info */
.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: rgba(16, 16, 40, 0.6);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(110, 231, 255, 0.2);
}

.stars-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
}

.star-icon {
    font-size: 1.5rem;
    color: #ffd700;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}

.balance-label {
    color: rgba(255, 255, 255, 0.7);
}

.balance-value {
    color: #ffd700;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Boost type badges */
.boost-types {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.type-badge {
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.type-vip {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.type-temporary {
    background: rgba(110, 231, 255, 0.1);
    color: #6ee7ff;
    border: 1px solid rgba(110, 231, 255, 0.3);
}

.type-permanent {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.type-lottery {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Lottery info */
.lottery-info {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin: 15px 0;
}

.lottery-timer, .lottery-prize {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a855f7;
    font-weight: 600;
    margin: 5px 0;
}

.timer-icon {
    font-size: 1.1rem;
}

/* Boosts intro */
.boosts-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(16, 16, 40, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(110, 231, 255, 0.2);
}

.boosts-intro p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .boosts-grid {
        grid-template-columns: 1fr;
    }
    
    .boost-card {
        padding: 15px;
    }
    
    .balance-info {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}

/* Отключаем масштабирование при двойном тапе на всех экранах кроме home */
/* .screen:not(#home-screen) {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
} */

/* Явно разрешаем взаимодействие только с элементами, которые должны быть кликабельны */
/* .screen:not(#home-screen) .upgrade-button,
.screen:not(#home-screen) .action-btn,
.screen:not(#home-screen) .task-btn,
.screen:not(#home-screen) .btn-cosmic,
.screen:not(#home-screen) .boost-buy-btn,
.screen:not(#home-screen) .nav-icon,
.screen:not(#home-screen) .bottom-nav a {
    touch-action: manipulation;
} */

/* Для модального окна тоже отключаем масштабирование */
/* .cosmic-modal {
    touch-action: pan-y;
} */

/* Для контента внутри экранов разрешаем скролл */
/* .screen:not(#home-screen) .screen-content {
    touch-action: pan-y;
} */