* {
    margin: 0;
    padding: 0; 
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-glow: #818cf8;
    --secondary: #06d6a0;
    --accent: #f59e0b;
    --danger: #ef4444;
    --background: #0f0f23;
    --surface: #1a1b2f;
    --surface-glow: #2d2b55;
    --text: #ffffff;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --neon-glow: 0 0 20px rgba(99, 102, 241, 0.5);
    --neon-glow-green: 0 0 20px rgba(6, 214, 160, 0.5);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/twinkling.png') repeat;
    animation: twinkle 200s linear infinite;
}

@keyframes twinkle {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

.app {
    max-width: 400px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

/* Header - фиксированный */
.header {
    padding: 15px;
    background: rgba(26, 27, 47, 0.95);
    border-bottom: 1px solid var(--surface-glow);
    backdrop-filter: blur(20px);
    
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-glow);
}

.logo i {
    font-size: 18px;
    animation: glow 2s ease-in-out infinite alternate;
}

.header-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
    flex: 1;
}

.stat-item i {
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

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

.stat-value {
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 9px;
    color: var(--text-secondary);
    opacity: 0.8;
    white-space: nowrap;
}

/* Main Content - с фиксированными header и navigation */
.main {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px; /* Отступ для навигации */
    padding-top: 0; /* Убираем верхний отступ, так как header фиксированный */
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mining Screen */
.mining-container {
    text-align: center;
}

.crystal-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px 0;
    height: 180px;
}

.crystal-orb {
    position: relative;
    width: 130px;
    height: 130px;
    background: var(--gradient-1);
    border-radius: 50%;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
    box-shadow: var(--neon-glow);
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.crystal-orb:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

.crystal-orb:active {
    transform: scale(0.95);
}

.crystal-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--gradient-3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.crystal-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid var(--primary-glow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 10s linear infinite;
}

.ring-1 {
    width: 100px;
    height: 100px;
    animation-duration: 15s;
}

.ring-2 {
    width: 120px;
    height: 120px;
    animation-duration: 12s;
    animation-direction: reverse;
}

.ring-3 {
    width: 140px;
    height: 140px;
    animation-duration: 18s;
}

.crystal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--secondary);
    border-radius: 50%;
    animation: particle-float 4s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 80%; left: 30%; animation-delay: 1s; }
.particle:nth-child(3) { top: 40%; left: 80%; animation-delay: 2s; }
.particle:nth-child(4) { top: 70%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 10%; left: 60%; animation-delay: 4s; }

/* Buttons */
.glowy-btn {
    position: relative;
    width: 100%;
    padding: 16px 20px;
    background: var(--gradient-2);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    touch-action: manipulation;
}

.glowy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

.glowy-btn:active {
    transform: translateY(0);
}

.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.neon-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.neon-card:hover {
    border-color: var(--primary-glow);
    box-shadow: var(--neon-glow);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.stat-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Profile Screen */
.profile-container {
    animation: slideUp 0.5s ease;
}

.profile-header {
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 15px;
}

.avatar-wrapper {
    margin-bottom: 12px;
}

.avatar-gradient {
    width: 70px;
    height: 70px;
    background: var(--gradient-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 26px;
    animation: glow 2s ease-in-out infinite alternate;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gradient-4);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
}

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

.stat-info i {
    font-size: 16px;
    color: var(--accent);
}

.stat-amount {
    font-weight: 700;
    font-size: 14px;
    color: var(--secondary);
}

/* Upgrades Screen */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 0 8px;
}

.section-header i {
    font-size: 20px;
    color: var(--primary-glow);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.upgrade-item {
    margin-bottom: 10px;
    padding: 16px;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.upgrade-name {
    font-weight: 600;
    font-size: 15px;
}

.upgrade-level {
    background: var(--gradient-4);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.upgrade-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.upgrade-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.buy-btn {
    background: var(--gradient-2);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    touch-action: manipulation;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-secondary);
}

/* Wallet Screen */
.wallet-container {
    animation: slideUp 0.5s ease;
}

.wallet-balance {
    padding: 16px;
    margin-bottom: 15px;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.balance-info i {
    font-size: 20px;
    color: var(--secondary);
}

.balance-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.balance-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

.exchange-rate {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.wallet-settings, .withdrawal-section {
    padding: 16px;
    margin-bottom: 15px;
}

.wallet-settings h3, .withdrawal-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.modern-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    transition: all 0.3s ease;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-glow);
    box-shadow: var(--neon-glow);
}

.save-btn, .withdraw-btn {
    padding: 10px 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    touch-action: manipulation;
}

.withdraw-btn {
    background: var(--gradient-2);
}

.save-btn:hover, .withdraw-btn:hover {
    transform: translateY(-2px);
}

.withdrawal-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Referrals Screen */
.referral-card {
    padding: 16px;
    margin-bottom: 15px;
}

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

.referral-header i {
    font-size: 20px;
    color: var(--accent);
}

.referral-link-container {
    margin-top: 15px;
}

.link-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.copy-btn {
    padding: 10px 14px;
    background: var(--gradient-3);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    touch-action: manipulation;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.referral-stats {
    display: grid;
   
    gap: 10px;
}

/* Navigation - фиксированное */
.navigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    
    width: 100%;
    max-width: 400px;
    display: flex;
    background: rgba(26, 27, 47, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--surface-glow);
    padding: 6px;
    z-index: 100;
	position: sticky;
    flex-shrink: 0;
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 3px;
    border-radius: 10px;
    position: relative;
    touch-action: manipulation;
}

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

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-btn.active .nav-icon {
    transform: translateY(-2px);
}

.nav-label {
    font-size: 9px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-indicator {
    position: absolute;
    top: -2px;
    width: 3px;
    height: 3px;
    background: var(--primary-glow);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-btn.active .nav-indicator {
    opacity: 1;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-crystal {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    margin: 0 auto 15px;
    position: relative;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-crystal .crystal-core {
    width: 25px;
    height: 25px;
}

/* Notification */
.notification {
   position: fixed;
    top: 93px;
    right: 15px;
    left: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1001;
    transform: translateY(-100px);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
   
    text-align: center;
}

.notification.show {
    transform: translateY(0);
}

.notification-success {
    background: var(--gradient-4);
    color: white;
}

.notification-error {
    background: var(--gradient-2);
    color: white;
}

.notification-info {
    background: var(--gradient-1);
    color: white;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    background: rgba(26, 27, 47, 0.9);
    padding: 30px 20px;
    border-radius: 16px;
    border: 1px solid var(--surface-glow);
    box-shadow: var(--neon-glow);
    margin: 20px;
}

.loading-crystal {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    margin: 0 auto 15px;
    position: relative;
    animation: pulse 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-crystal .crystal-core {
    width: 25px;
    height: 25px;
    background: var(--gradient-3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.loading-content p {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Mining animations */
.mine-btn.mining {
    transform: scale(0.95);
    opacity: 0.7;
}

.crystal-orb.mining {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Quests */
.quest-item {
    margin-bottom: 12px;
    padding: 16px;
}

.quest-item.completed {
    border-left: 3px solid #4CAF50;
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.quest-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 15px;
}

.quest-reward {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 12px;
}

.quest-description {
    margin-bottom: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    line-height: 1.4;
}

.quest-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quest-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    transition: transform 0.2s;
    touch-action: manipulation;
}

.quest-btn:hover {
    transform: translateY(-2px);
}

.quest-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.subscribe-btn {
    background: linear-gradient(45deg, #0088cc, #00aced);
}

.claim-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.quest-status {
    color: #4CAF50;
    font-weight: bold;
    font-size: 12px;
}

.quests-info {
    margin-bottom: 15px;
    text-align: center;
}

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

.info-header i {
    font-size: 1.3em;
    color: var(--accent);
}

/* Upgrade button */
.upgrade-btn {
    background: linear-gradient(135deg, #8A2BE2, #4B0082);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.upgrade-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
}

.upgrade-btn:hover::after {
    transform: translateX(100%);
    transition: transform 0.6s;
}

.upgrade-btn:hover {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
}

/* Quests container */
.quests-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

.quests-info {
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.quests-info .info-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.quests-info .info-header i {
    font-size: 1.5em;
    color: #6a11cb;
}

.quests-info h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.quests-info p {
    color: #ccc;
    margin: 0;
    line-height: 1.4;
    font-size: 13px;
}

.quest-item {
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(106, 17, 203, 0.3);
    transition: all 0.3s ease;
}

.quest-item:hover {
    border-color: rgba(106, 17, 203, 0.6);
    transform: translateY(-2px);
}

.quest-item.completed {
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.05);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.quest-title {
    flex: 1;
    min-width: 0;
}

.quest-title h3 {
    margin: 0 0 6px 0;
    color: #fff;
    font-size: 15px;
}

.quest-type-badge {
    background: rgba(106, 17, 203, 0.3);
    color: #b19cd9;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.quest-reward {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    padding: 6px 10px;
    border-radius: 16px;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

.quest-description {
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 13px;
}

.quest-progress {
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-fill.completed {
    width: 100%;
    background: linear-gradient(45deg, #28a745, #20c997);
}

.progress-text {
    color: #888;
    font-size: 11px;
    font-weight: 500;
}

.quest-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quest-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.quest-btn:not(:disabled):hover {
    transform: translateY(-2px);
}

.quest-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.subscribe-btn {
    background: linear-gradient(45deg, #0088cc, #00a2ff);
    color: white;
}

.claim-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
}

.quest-btn:not(.subscribe-btn):not(.claim-btn) {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    color: white;
}

.quest-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .app {
        max-width: 100%;
        margin: 0;
    }
    
    .header {
        padding: 12px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .header-stats {
        justify-content: space-between;
    }
    
    .stat-item {
        flex: 1;
        min-width: 0;
    }
    
    .main {
        padding: 12px;
        padding-bottom: 70px;
        padding-top: 0;
    }
    
    .crystal-orb {
        width: 120px;
        height: 120px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .glowy-btn {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .navigation {
        max-width: 100%;
        padding: 5px;
    }
    
    .nav-btn {
        padding: 5px 2px;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
    
    .nav-label {
        font-size: 8px;
    }
    
    /* Improve touch targets */
    button, .nav-btn, .quest-btn, .buy-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .crystal-orb {
        min-height: 120px;
        min-width: 120px;
    }
}

@media (max-width: 360px) {
    .header-stats {
        flex-direction: column;
        gap: 6px;
    }
    
    .stat-item {
        justify-content: center;
    }
    
    .crystal-orb {
        width: 100px;
        height: 100px;
    }
    
    .crystal-core {
        width: 40px;
        height: 40px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quest-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quest-reward {
        align-self: flex-start;
    }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 8px 15px;
    }
    
    .main {
        padding-bottom: 60px;
        min-height: calc(100vh - 100px);
    }
    
    .crystal-wrapper {
        height: 120px;
        margin: 10px 0;
    }
    
    .crystal-orb {
        width: 80px;
        height: 80px;
    }
    
    .navigation {
        padding: 4px;
    }
}

/* Prevent zoom on input focus for iOS */
@media (max-width: 480px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .crystal-orb, .loading-crystal, .avatar-gradient {
        image-rendering: -webkit-optimize-contrast;
    }
}

.stat-usdt {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.8;
}

/* Premium Screen Styles */
.premium-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.active-premium {
    margin-bottom: 30px;
    padding: 20px;
}

.active-premium h3 {
    color: #FFD700;
    margin-bottom: 15px;
}

.premium-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.premium-card {

    /* border: 2px solid; */
    /* border-radius: 15px; */
    /* padding: 25px; */
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    /* overflow: hidden;*/
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color), transparent);
}

.pro-card { --card-color: #00FF00; border-color: #00FF00; }
.epic-card { --card-color: #4169E1; border-color: #4169E1; }
.booster-card { --card-color: #FF4500; border-color: #FF4500; }
.legendary-card { --card-color: #8A2BE2; border-color: #8A2BE2; }

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

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

.premium-icon {
    font-size: 2em;
    color: var(--card-color);
}

.premium-badge-monthly,
.premium-badge-weekly,
.premium-badge-permanent {
    background: var(--card-color);
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
}

.premium-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.premium-description {
    color: #B0BEC5;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.premium-features {
    text-align: left;
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #fff;
    font-size: 0.9em;
}

.feature-item i {
    color: var(--card-color);
}

.premium-price {
    margin-bottom: 20px;
}

.price-usd {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 5px;
}

.price-drop {
    color: #B0BEC5;
    font-size: 0.9em;
}

.premium-buy-btn {
    background: linear-gradient(45deg, var(--card-color), #FFD700);
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.premium-buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* Active premium features */
.active-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.active-feature-item {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #FFD700;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feature-info h4 {
    color: #FFD700;
    margin-bottom: 5px;
}

.feature-expires {
    color: #B0BEC5;
    font-size: 0.8em;
}

/* Стили для состояния загрузки и ошибок */
.loading {
    text-align: center;
    color: #B0BEC5;
    padding: 40px;
    font-size: 1.1em;
}

.no-premium {
    text-align: center;
    color: #B0BEC5;
    padding: 40px;
    font-size: 1.1em;
    grid-column: 1 / -1;
}

.premium-error {
    text-align: center;
    color: #ff4444;
    padding: 20px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 10px;
    margin: 20px 0;
}

/* ===== СТИЛИ ДЛЯ КОСМИЧЕСКИХ СОБЫТИЙ ===== */

.events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Активные события */
.active-events {
    margin-bottom: 40px;
}

.active-event-card {
   
    border: 2px solid;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
}

.active-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--event-color), transparent);
}

.multiplier-event { --event-color: #FFD700; border-color: #FFD700; }
.energy-event { --event-color: #00FF00; border-color: #00FF00; }
.bonus-event { --event-color: #4169E1; border-color: #4169E1; }
.special-event { --event-color: #8A2BE2; border-color: #8A2BE2; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
}

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

.event-icon {
    font-size: 2em;
    color: var(--event-color);
}

.event-timer {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: #FFD700;
    border: 1px solid #FFD700;
}

.active-event-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.active-event-card p {
    color: #B0BEC5;
    margin-bottom: 15px;
    line-height: 1.5;
}

.event-effect {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 10px;
    color: var(--event-color);
    font-weight: bold;
    border-left: 3px solid var(--event-color);
}

/* Список всех событий */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.event-card {
  
    border: 1px solid #2a2a4a;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: #4169E1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

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

.event-card h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2em;
    flex: 1;
}

.event-chance {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 10px;
}

.event-card p {
    color: #B0BEC5;
    margin-bottom: 20px;
    line-height: 1.4;
}

.event-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.event-effect,
.event-duration,
.event-cooldown {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.9em;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.event-effect i { color: #00FF00; }
.event-duration i { color: #4169E1; }
.event-cooldown i { color: #FFA500; }

.event-trigger-btn {
    background: linear-gradient(45deg, #4169E1, #8A2BE2);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.9em;
}

.event-trigger-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.4);
}

.event-trigger-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* Состояние отсутствия событий */
.no-events {
    text-align: center;
    padding: 60px 20px;
    color: #B0BEC5;
}

.no-events i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-events h3 {
    color: #fff;
    margin-bottom: 10px;
}

/* ===== СТИЛИ ДЛЯ АРТЕФАКТОВ ===== */

.artifacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.artifact-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid;
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.artifact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--artifact-color), transparent);
}

.common-artifact { --artifact-color: #B0BEC5; border-color: #B0BEC5; }
.rare-artifact { --artifact-color: #4169E1; border-color: #4169E1; }
.epic-artifact { --artifact-color: #8A2BE2; border-color: #8A2BE2; }
.legendary-artifact { --artifact-color: #FFD700; border-color: #FFD700; }

.artifact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

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

.artifact-icon {
    font-size: 2.5em;
    color: var(--artifact-color);
}

.artifact-rarity {
    background: var(--artifact-color);
    color: #000;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
}

.artifact-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.artifact-description {
    color: #B0BEC5;
    margin-bottom: 15px;
    line-height: 1.4;
}

.artifact-effect {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: #fff;
    border-left: 3px solid var(--artifact-color);
}

.artifact-effect i {
    color: var(--artifact-color);
    font-size: 1.2em;
}

.artifact-level {
    text-align: center;
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
}

.artifact-price {
    text-align: center;
    margin-bottom: 20px;
}

.price-drop {
    font-size: 1.3em;
    font-weight: bold;
    color: #FFD700;
}

.artifact-buy-btn,
.artifact-upgrade-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.artifact-buy-btn {
    background: linear-gradient(45deg, var(--artifact-color), #FFD700);
    color: #000;
}

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

.artifact-buy-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.artifact-upgrade-btn {
    background: linear-gradient(45deg, #00FF00, #008000);
    color: #000;
}

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

.artifact-upgrade-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* Анимации для артефактов */
@keyframes artifact-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px var(--artifact-color);
    }
}

.legendary-artifact {
    animation: artifact-glow 3s infinite;
}

.epic-artifact {
    animation: artifact-glow 4s infinite;
}

/* Адаптивность */
@media (max-width: 768px) {
    .events-container {
        padding: 10px;
    }
    
    .events-list {
        grid-template-columns: 1fr;
    }
    
    .artifacts-grid {
        grid-template-columns: 1fr;
    }
    
    .event-details {
        grid-template-columns: 1fr;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .event-chance {
        align-self: flex-start;
    }
}

/* Состояния загрузки и ошибок */
.loading {
    text-align: center;
    color: #B0BEC5;
    padding: 40px;
    font-size: 1.1em;
}

.no-events,
.no-artifacts {
    text-align: center;
    color: #B0BEC5;
    padding: 40px;
    grid-column: 1 / -1;
}

.premium-error {
    text-align: center;
    color: #ff4444;
    padding: 20px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 10px;
    margin: 20px 0;
}
/* Добавь эти стили в events.css */

.event-energy-cost {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00FF00;
    font-size: 0.9em;
    padding: 8px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 8px;
    font-weight: bold;
}

.event-energy-cost i {
    color: #00FF00;
}

.energy-warning {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.8em;
    margin-top: 5px;
    text-align: center;
    border: 1px solid #ff4444;
}

.event-trigger-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.event-trigger-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Обновленная кнопка активации */
.event-trigger-btn {
    background: linear-gradient(45deg, #4169E1, #8A2BE2);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.9em;
    margin-top: 10px;
}

.event-trigger-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.4);
}

        /* Стили для анимаций фона */
        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
        }

        .stars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent;
        }

        .stars::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                radial-gradient(2px 2px at 20px 30px, #eee, transparent),
                radial-gradient(2px 2px at 40px 70px, #fff, transparent),
                radial-gradient(1px 1px at 90px 40px, #ddd, transparent),
                radial-gradient(1px 1px at 130px 80px, #fff, transparent),
                radial-gradient(2px 2px at 160px 30px, #eee, transparent);
            background-repeat: repeat;
            background-size: 200px 100px;
            animation: starsMove 100s linear infinite;
        }

        .twinkling {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent;
            animation: twinkle 4s ease-in-out infinite alternate;
        }

        /* Падающие звезды */
        .shooting-stars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .shooting-star {
            position: absolute;
            background: linear-gradient(45deg, transparent, #fff, transparent);
            border-radius: 50%;
            filter: blur(1px);
            animation: shootingStar 3s linear infinite;
        }

        .shooting-star::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #fff;
            border-radius: 50%;
            filter: blur(3px);
        }

        /* Орбитальные спутники */
        .satellites {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100vmax;
            height: 100vmax;
            pointer-events: none;
        }

        .satellite {
            position: absolute;
            width: 6px;
            height: 6px;
            background: rgba(100, 200, 255, 0.8);
            border-radius: 50%;
            filter: blur(0.5px);
            box-shadow: 0 0 10px 2px rgba(100, 200, 255, 0.5);
        }

        .satellite::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 12px;
            height: 12px;
            border: 1px solid rgba(100, 200, 255, 0.3);
            border-radius: 50%;
            animation: satellitePulse 2s ease-in-out infinite;
        }

        .satellite.trail::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 20px;
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.6));
            transform-origin: left center;
        }

        /* Анимации */
        @keyframes starsMove {
            from { transform: translateY(0); }
            to { transform: translateY(-100px); }
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.2; }
            50% { opacity: 0.8; }
        }

        @keyframes shootingStar {
            0% {
                transform: translateX(-100px) translateY(-100px) rotate(45deg);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px)) rotate(45deg);
                opacity: 0;
            }
        }

        @keyframes satellitePulse {
            0%, 100% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 0.5;
            }
            50% {
                transform: translate(-50%, -50%) scale(1.5);
                opacity: 0.8;
            }
        }

        @keyframes orbit1 {
            from { transform: rotate(0deg) translateX(40vmin) rotate(0deg); }
            to { transform: rotate(360deg) translateX(40vmin) rotate(-360deg); }
        }

        @keyframes orbit2 {
            from { transform: rotate(120deg) translateX(60vmin) rotate(-120deg); }
            to { transform: rotate(480deg) translateX(60vmin) rotate(-480deg); }
        }

        @keyframes orbit3 {
            from { transform: rotate(240deg) translateX(80vmin) rotate(-240deg); }
            to { transform: rotate(600deg) translateX(80vmin) rotate(-600deg); }
        }

        /* Планеты */
        .planets {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .planet {
            position: absolute;
            border-radius: 50%;
            filter: blur(0.5px);
        }

        .planet-1 {
            width: 80px;
            height: 80px;
            top: 20%;
            left: 10%;
            background: radial-gradient(circle at 30% 30%, #ff6b6b, #c44569);
            box-shadow: 0 0 50px rgba(255, 107, 107, 0.3);
            animation: planetFloat 20s ease-in-out infinite;
        }

        .planet-2 {
            width: 60px;
            height: 60px;
            bottom: 15%;
            right: 8%;
            background: radial-gradient(circle at 40% 40%, #74b9ff, #0984e3);
            box-shadow: 0 0 40px rgba(116, 185, 255, 0.3);
            animation: planetFloat 25s ease-in-out infinite reverse;
        }

        @keyframes planetFloat {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            25% { transform: translateY(-20px) rotate(5deg); }
            50% { transform: translateY(0px) rotate(0deg); }
            75% { transform: translateY(15px) rotate(-5deg); }
        }
