/* =========================================================
   GK Learn Study — App Style Modern Home UI (Original Design)
   ========================================================= */

.app-home-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 1. Student Gamified Profile Card */
.gk-profile-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #4f46e5 100%);
  border-radius: 20px;
  padding: 1.5rem;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
  position: relative;
  overflow: hidden;
}

.gk-profile-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.gk-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.gk-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gk-avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.gk-welcome-sub {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  font-weight: 600;
}

.gk-user-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gk-edit-badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.gk-edit-badge:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Stat Counters Inside Banner */
.gk-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 10px 8px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.gk-stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.gk-stat-item:last-child {
  border-right: none;
}

/* Banner Action Buttons */
.gk-banner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gk-btn-action {
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.gk-btn-test {
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.gk-btn-rank {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 2. Section Header with Filters */
.gk-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}

.gk-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.gk-filter-pills {
  display: flex;
  gap: 8px;
}

.gk-pill-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.gk-pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 3. Featured Horizontal Card (Trending Current Affairs) */
.gk-featured-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gk-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.gk-feat-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gk-feat-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ffedd5;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

[data-theme="dark"] .gk-feat-icon-bubble {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
}

.gk-feat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.gk-badge-trending {
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .gk-badge-trending {
  background: rgba(220, 38, 38, 0.25);
  color: #f87171;
}

.gk-feat-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.gk-btn-play {
  background: var(--accent);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.2s;
}

.gk-btn-play:hover {
  background: #ea580c;
  transform: scale(1.03);
}

/* 4. Two-Column App Mode Cards */
.gk-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gk-mode-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gk-mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.gk-mode-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.icon-purple {
  background: #ede9fe;
  color: #7c3aed;
}

.icon-blue {
  background: #e0f2fe;
  color: #0284c7;
}

[data-theme="dark"] .icon-purple {
  background: rgba(124, 58, 237, 0.2);
  color: #c084fc;
}

[data-theme="dark"] .icon-blue {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

.gk-mode-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.gk-mode-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.gk-btn-mode-action {
  width: 100%;
  max-width: 140px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-orange {
  background: var(--accent);
}

.btn-blue {
  background: var(--primary);
}

.gk-btn-mode-action:hover {
  opacity: 0.9;
  transform: scale(1.04);
}

/* 5. Learning Progress Card */
.gk-progress-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.gk-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gk-prog-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gk-prog-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

[data-theme="dark"] .gk-prog-icon {
  background: rgba(5, 150, 105, 0.2);
  color: #34d399;
}

.gk-prog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.gk-level-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
}

[data-theme="dark"] .gk-level-badge {
  background: rgba(3, 105, 161, 0.25);
  color: #38bdf8;
}

.gk-prog-track {
  width: 100%;
  height: 10px;
  background: var(--bg-alt);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.gk-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.gk-prog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gk-acc-stat {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gk-btn-details {
  background: #0284c7;
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.gk-btn-details:hover {
  background: #0369a1;
}

/* Responsive Tweaks */
@media (max-width: 600px) {
  .app-home-wrapper {
    padding: 0.75rem 0.75rem 2.5rem;
    gap: 1.25rem;
  }
  .gk-user-name {
    font-size: 1.15rem;
  }
  .gk-featured-card {
    flex-direction: column;
    align-items: stretch;
  }
  .gk-btn-play {
    justify-content: center;
  }
}
