:root {
  --primary-color: #2196F3;
  --primary-dark: #1976D2;
  --secondary-color: #42A5F5;
  --accent-color: #00BCD4;
  --success-color: #4CAF50;
  --warning-color: #FF9800;
  --danger-color: #F44336;
  --gold-color: #FFD700;
  --bg-color: #0D1117;
  --card-bg: #161B22;
  --header-bg: #1A1F2E;
  --text-color: #FFFFFF;
  --text-secondary: #8B949E;
  --border-color: #30363D;
}

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

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Фикс для мобильных браузеров */
  height: -webkit-fill-available;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  height: var(--tg-viewport-height, 100vh);
  min-height: -webkit-fill-available;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Content Layout */
.content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#pages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background-color: var(--bg-color);
}

/* Header */
.header {
  background: #4361A6;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

/* App Title Bar */
.app-title-bar {
  padding: 24px 16px 20px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-content {
  padding: 16px;
  padding-top: 16px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.app-logo {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.btn-admin {
  background: rgba(255, 215, 0, 0.2);
  border: 2px solid #FFD700;
  color: #FFD700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-admin:hover {
  background: rgba(255, 215, 0, 0.3);
  transform: scale(1.05);
}

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

.header-user-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  padding: 4px;
  border-radius: 8px;
}

.header-user-block:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.header-user-block:active {
  transform: scale(0.95);
}

.header-username {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  max-width: 60px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}

.header-balance {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-withdraw-compact {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.btn-withdraw-compact i {
  font-size: 10px;
}

.btn-withdraw-compact:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

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

.header-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  text-transform: uppercase;
}

.balance-label {
  font-size: 12px;
  opacity: 0.9;
}

.balance-amount {
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.header-level-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
  transition: all 0.2s;
  padding: 4px;
  border-radius: 8px;
}

.header-level-block:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.header-level-block:active {
  transform: scale(0.98);
}

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

.level-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.xp-info {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.9;
}

.level-progress {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.old-level-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.xp-info {
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.9;
}

/* Pages */
.content {
  opacity: 1;
  transition: opacity 0.3s;
}

.page {
  display: none;
  animation: fadeIn 0.3s;
  height: 100%;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-content {
  padding: 16px;
  padding-bottom: 100px;
  min-height: 100%;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title i {
  color: var(--primary-color);
}

/* Cards */

/* News Slider */
.news-slider-container {
  margin-bottom: 20px;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.news-welcome h2 {
  font-size: 20px;
  margin: 0;
  color: var(--text-color);
}

.news-arrows {
  display: flex;
  gap: 8px;
}

.news-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  font-size: 14px;
}

.news-arrow:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.news-arrow:active {
  transform: scale(0.95);
}

.news-slider-wrapper {
  overflow: hidden;
  border-radius: 16px;
}

.news-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 12px;
  padding: 0 4px 12px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.news-slider::-webkit-scrollbar {
  display: none;
}

.news-slide {
  min-width: 100%;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  scroll-snap-align: start;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.news-slide:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.news-icon {
  font-size: 48px;
  flex-shrink: 0;
  line-height: 1;
}

.news-content h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-color);
}

.news-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.news-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.news-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.3s;
  cursor: pointer;
}

.news-dot.active {
  background: var(--primary-color);
  width: 24px;
  border-radius: 4px;
}

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

.stat-card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.stat-icon i {
  display: block;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Level Progress */
.level-progress-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.progress-bar {
  height: 12px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.5s ease;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-btn {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
}

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

.action-btn.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: transparent;
}

.btn-icon {
  font-size: 28px;
}

/* Earn Page */
.earn-section {
  margin-bottom: 30px;
}

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

.section-header h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h3 i {
  color: var(--primary-color);
}

.add-ad-btn {
  font-size: 11px;
  color: var(--text-secondary);
  background: transparent;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.add-ad-btn:hover {
  background: var(--card-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

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

.add-ad-btn i {
  font-size: 10px;
}

.ad-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
}

.ad-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.ad-placeholder {
  width: 60px;
  height: 60px;
  background: var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.ad-placeholder i {
  font-size: 30px;
}

.ad-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ad-info-left {
  display: flex;
  flex-direction: column;
}

.ad-info-right {
  display: flex;
  align-items: center;
}

.ad-reward {
  font-size: 24px;
  font-weight: 700;
  color: var(--success-color);
  margin-bottom: 4px;
}

.ad-xp {
  font-size: 14px;
  color: var(--text-secondary);
}

.ad-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  border-radius: 8px;
}

.ad-time-label {
  font-size: 9px;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

.ad-time {
  font-size: 13px;
  color: var(--warning-color);
  font-weight: 700;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
}

.ad-note {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 12px;
}

.ad-message {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

/* Buttons */
.btn {
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-color);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary i {
  font-size: 18px;
}

.btn-secondary {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
}

.btn-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}

.btn-full {
  width: 100%;
}

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

/* Tasks List */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  background: var(--card-bg);
  padding: 14px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.task-card:hover {
  border-color: var(--primary-color);
}

.task-card.completed {
  opacity: 0.5;
  background: rgba(76, 175, 80, 0.1);
}

.task-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 150, 243, 0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

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

.task-info {
  flex: 1;
}

.task-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.task-description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

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

.task-money {
  font-size: 16px;
  font-weight: 700;
  color: var(--success-color);
  white-space: nowrap;
}

.task-xp {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 600;
  white-space: nowrap;
}

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

.task-action .btn {
  padding: 8px 16px;
  font-size: 13px;
  white-space: nowrap;
}

/* Premium Card */
.premium-card {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1A1F2E;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.2);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.premium-badge i {
  color: var(--gold-color);
}

.premium-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #1A1F2E;
}

.premium-card p {
  color: #1A1F2E;
}

.premium-benefits {
  margin: 16px 0;
}

.benefit {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.premium-card .benefit {
  color: #1A1F2E;
}

.benefit i {
  color: var(--success-color);
  font-size: 16px;
}

/* Upgrade Card */
.upgrade-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.upgrade-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* Info Card */
.info-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h3 i {
  color: var(--primary-color);
}

.levels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.level-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

/* Referral Card */
.referral-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.referral-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.referral-link-container {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  align-items: center;
}

.referral-input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: var(--text-color);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-item {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.referrals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-item {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Wallet Page */
.balance-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 24px;
}

.balance-amount-large {
  font-size: 48px;
  font-weight: 700;
  margin: 12px 0;
}

.balance-note {
  font-size: 14px;
  opacity: 0.9;
}

/* Form */
.withdrawal-form {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 16px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Withdrawal History */
.withdrawal-history h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.withdrawals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.withdrawal-item {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
}

.withdrawal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.withdrawal-amount {
  font-size: 18px;
  font-weight: 700;
}

.withdrawal-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.withdrawal-status.pending {
  background: var(--warning-color);
  color: #000;
}

.withdrawal-status.completed {
  background: var(--success-color);
  color: #000;
}

.withdrawal-status.rejected {
  background: var(--danger-color);
}

.withdrawal-details {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Profile Page */
.profile-card {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: none;
}

.profile-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
}

.profile-info h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.profile-stat {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.info-section {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
}

.info-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
  border-bottom: none;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 100;
  flex-shrink: 0;
  gap: 4px;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  min-width: 0;
  max-width: 80px;
}

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

.nav-icon {
  font-size: 22px;
  display: block;
  line-height: 1;
}

.nav-icon i {
  display: block;
}

.nav-label {
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  max-width: 90%;
  width: 400px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.3s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.modal-header h2 {
  font-size: 20px;
  margin: 0;
  color: var(--text-color);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--danger-color);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.news-modal-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 16px;
}

.modal-body p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-body li {
  padding: 12px 16px;
  background: rgba(33, 150, 243, 0.1);
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-body li:before {
  content: '✓';
  color: var(--success-color);
  font-weight: bold;
  font-size: 18px;
}

.premium-benefits h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-color);
}

.premium-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.premium-benefits li {
  padding: 12px 16px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid var(--gold-color);
}

.premium-benefits li:before {
  content: '';
  display: none;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-slide-up {
  animation: slideUp 0.3s ease;
}

/* Compact Styles for Dashboard */
.stats-grid.compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stats-grid.compact .stat-card {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-grid.compact .stat-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.stats-grid.compact .stat-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-grid.compact .stat-value {
  font-size: 16px;
  margin-bottom: 2px;
}

.stats-grid.compact .stat-label {
  font-size: 10px;
}

/* Compact Ad Card */
.ad-card.compact {
  padding: 16px;
}

.ad-card.compact .ad-preview {
  margin-bottom: 12px;
}

.ad-card.compact .ad-placeholder {
  width: 60px;
  height: 60px;
  font-size: 30px;
}

/* Compact Task Cards */
.tasks-list.compact .task-card {
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.task-card.compact .task-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.task-card.compact .task-info {
  flex: 1;
  min-width: 0;
}

.task-card.compact .task-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-reward-inline {
  display: flex;
  gap: 8px;
  font-size: 12px;
  margin-top: 2px;
}

.task-reward-inline .money {
  color: var(--success-color);
  font-weight: 600;
}

.task-reward-inline .xp {
  color: var(--primary-color);
  font-weight: 600;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 14px;
  min-width: auto;
}

.btn-sm i {
  font-size: 14px;
}

.no-tasks {
  text-align: center;
  color: var(--text-secondary);
  padding: 20px;
  font-size: 14px;
}

.link-more {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.link-more:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  .ad-placeholder {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .ad-placeholder i {
    font-size: 24px;
  }
  
  .ad-reward {
    font-size: 20px;
  }
}

/* Анимация для Premium короны */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 375px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-label {
    font-size: 9px;
  }
}
