/* =====================================================
   BOT APP GLASSMORPHISM STYLES
   ===================================================== */

.app-container {
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* Profile Header */
.profile-header {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 30px 30px;
  padding: 32px 20px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.app-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.user-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid transparent;
  background: var(--gradient-primary);
  padding: 3px;
  object-fit: cover;
  margin-bottom: 16px;
}

.user-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.user-balance-container {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.user-balance {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-top: 4px;
}

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

.mini-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.mini-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.mini-stat-card h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.mini-stat-card p {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Task Card */
.task-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.task-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--glass-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.task-icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.task-info {
  flex: 1;
}

.task-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.task-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.task-btn {
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.task-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.task-btn:disabled {
  background: var(--glass-white);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Progress Bar */
.progress-container {
  padding: 0 16px;
  margin-bottom: 24px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--glass-white);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Chart Container */
.chart-container {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  margin: 0 16px 24px;
}

.chart-container h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 150px;
  padding-top: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-bar {
  width: 12%;
  background: var(--gradient-primary);
  border-radius: 8px 8px 0 0;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chart-bar:hover {
  opacity: 0.8;
}

.chart-bar .tooltip {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.chart-bar:hover .tooltip {
  opacity: 1;
}

.chart-labels {
  display: flex;
  justify-content: space-around;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* History Item */
.history-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-details p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.history-details small {
  font-size: 12px;
  color: var(--text-muted);
}

.history-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-completed {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
  color: #00f2fe;
  border: 1px solid rgba(79, 172, 254, 0.3);
}

.status-pending {
  background: linear-gradient(135deg, rgba(250, 112, 154, 0.2), rgba(254, 225, 64, 0.2));
  color: #fee140;
  border: 1px solid rgba(250, 112, 154, 0.3);
}

.status-rejected {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(238, 90, 111, 0.2));
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  z-index: 1000;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.3s ease;
  flex: 1;
}

.nav-btn i {
  font-size: 20px;
}

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

.nav-btn.active i {
  transform: scale(1.1);
}

/* Form Styles */
.form-container {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  margin: 0 16px 16px;
}

.form-container h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--glass-white);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-submit {
  width: 100%;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  padding: 14px;
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.form-submit:disabled {
  background: var(--glass-white);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Leaderboard */
.leaderboard-toggle {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 20px;
}

.toggle-btn {
  flex: 1;
  background: var(--glass-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.leaderboard-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin: 0 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  width: 40px;
  text-align: center;
}

.leaderboard-item img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}

.leaderboard-score {
  font-weight: 700;
  font-size: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Page Transitions */
.page {
  display: none;
  animation: fadeIn 0.4s ease;
}

.page.active {
  display: block;
}

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

/* Section Headers */
.section-header {
  padding: 0 16px;
  margin: 24px 0 16px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Loading Spinner */
.app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.app-loader .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--glass-white);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-progress {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
}

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