/* ==========================================================================
   FarmVerse 2.0 - Components (Header, Left Sidebar, Modals, Chat, Clans, Auth, Profile)
   ========================================================================== */

/* Top Player Status Header */
.top-header {
  position: relative;
  z-index: 100;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  height: 64px;
}

.player-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s;
  padding: 4px 8px;
  border-radius: 14px;
}

.player-profile:hover {
  background: rgba(76, 175, 80, 0.12);
  transform: scale(1.02);
}

.avatar-badge {
  font-size: 2rem;
  background: #e8f5e9;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

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

.player-info {
  display: flex;
  flex-direction: column;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-name {
  font-weight: 800;
  font-size: 1rem;
}

.level-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.xp-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.xp-bar-bg {
  width: 130px;
  height: 7px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  width: 0%;
  transition: width 0.3s ease;
}

.xp-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* Day Cycle HUD */
.day-cycle-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 12px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.day-cycle-text {
  font-weight: 800;
  font-size: 0.85rem;
  color: #ea580c;
  display: flex;
  align-items: center;
  gap: 4px;
}

.day-cycle-bar-bg {
  width: 90px;
  height: 5px;
  background: #fed7aa;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 2px;
}

.day-cycle-bar-fill {
  height: 100%;
  background: #f97316;
  width: 100%;
  transition: width 1s linear;
}

/* Resources & Storage */
.header-resources {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resource-chip {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.9rem;
  gap: 5px;
}

.resource-chip.coins span.num { color: #d97706; }
.resource-chip.gems span.num { color: #0284c7; }

.storage-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 800;
}

.storage-bar-bg {
  width: 70px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;
  background: #22c55e;
  width: 0%;
  transition: width 0.3s;
}

.active-boosts-container {
  display: flex;
  gap: 4px;
}

.boost-chip {
  background: #fef08a;
  color: #854d0e;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid #fde047;
  animation: subtlePulse 1.5s infinite alternate;
}

@keyframes subtlePulse {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}

/* ==========================================================================
   Left Vertical Compact Sidebar Navigation
   ========================================================================== */
.left-sidebar {
  position: absolute;
  top: 72px;
  left: 10px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(8px);
  padding: 6px 5px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(255, 255, 255, 0.6);
  max-height: calc(100vh - 84px);
  overflow-y: auto;
}

.sidebar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 4px;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-dark);
  min-width: 50px;
}

.sidebar-btn:hover {
  background: #e8f5e9;
  transform: translateX(3px) scale(1.05);
}

.sidebar-btn:active {
  transform: scale(0.94);
}

.sidebar-icon {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 2px;
}

.sidebar-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-window {
  background: white;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: #edf2f7;
  border: none;
  font-size: 1.2rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  background: #e2e8f0;
}

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

/* ==========================================================================
   OAuth Windows (Google & Discord Popups)
   ========================================================================== */
.oauth-window {
  background: #ffffff !important;
  width: 100% !important;
  max-width: 440px !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  z-index: 10001 !important;
}

.google-oauth-box {
  background: #ffffff !important;
  color: #202124 !important;
}

.discord-oauth-box {
  background: #313338 !important;
  color: #dbdee1 !important;
}

.oauth-header {
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: 1px solid #e8eaed !important;
  background: #ffffff !important;
}

.discord-oauth-box .oauth-header {
  background: #5865f2 !important;
  color: white !important;
  border-bottom: none !important;
}

.oauth-body {
  padding: 20px 24px !important;
  display: flex !important;
  flex-direction: column !important;
}

.oauth-account-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.oauth-acc-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  border: 1.5px solid #e8eaed !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: left !important;
}

.oauth-acc-item:hover {
  background: #f1f3f4 !important;
  border-color: #4285f4 !important;
  transform: translateX(3px) !important;
}

.oauth-acc-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  border: 1.5px solid #dadce0 !important;
}

.oauth-acc-name {
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  color: #202124 !important;
  line-height: 1.2 !important;
}

.oauth-acc-email {
  font-size: 0.8rem !important;
  color: #5f6368 !important;
  margin-top: 2px !important;
}

/* Tabs */
.modal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dark);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
}

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

.btn-primary {
  background: #22c55e;
  color: white;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}
.btn-primary:hover { background: #16a34a; }

.btn-warning {
  background: #f59e0b;
  color: white;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover { background: #d97706; }

.btn-success {
  background: #10b981;
  color: white;
}
.btn-success:hover { background: #059669; }

.btn-secondary {
  background: #e2e8f0;
  color: #475569;
}
.btn-secondary:hover { background: #cbd5e1; }

.btn-google {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.btn-google:hover { background: #f9fafb; }

.btn-discord {
  background: #5865F2;
  color: white;
}
.btn-discord:hover { background: #4752C4; }

.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-xs { padding: 3px 7px; font-size: 0.72rem; border-radius: 6px; }
.btn-lg { padding: 10px 20px; font-size: 1rem; }

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  text-align: left;
}
.form-group label {
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
}
.form-control {
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
}
.form-select-sm {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
}

/* Crop Cards in Selector */
.crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 10px;
}

.crop-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.crop-card:hover:not(.locked) {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.crop-card.locked {
  opacity: 0.6;
  filter: grayscale(80%);
  cursor: not-allowed;
}

.crop-card-icon { font-size: 2.2rem; margin-bottom: 2px; }
.crop-card-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.crop-card-details { display: flex; flex-direction: column; gap: 2px; font-size: 0.72rem; color: var(--text-muted); }
.crop-lock-badge { position: absolute; top: 4px; right: 4px; background: #ef4444; color: white; font-size: 0.62rem; padding: 2px 5px; border-radius: 6px; font-weight: 700; }

/* Market & Animals & Inventory */
.market-list, .animals-list, .orders-list, .quests-list, .automations-list, .clans-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.market-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.market-item-card.locked { opacity: 0.6; }
.market-item-header { display: flex; align-items: center; gap: 10px; }
.market-item-icon { font-size: 1.8rem; }
.market-item-title { font-weight: 700; font-size: 0.95rem; }
.market-item-sub { font-size: 0.75rem; color: var(--text-muted); }
.market-item-action { display: flex; align-items: center; gap: 10px; }
.market-item-price { font-weight: 800; color: #d97706; font-size: 0.9rem; }
.sell-btn-group { display: flex; gap: 4px; }

/* Inventory */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
}

.inventory-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.inventory-icon { font-size: 2rem; }
.inventory-name { font-size: 0.8rem; font-weight: 700; }
.inventory-badge {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==========================================================================
   Animal Farms Component
   ========================================================================== */
.farm-active-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.farm-active-header h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 2px;
}

.animals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.animal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.animal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.animal-card.ready-pulse {
  border-color: #22c55e;
  background: #f0fdf4;
  animation: pulseCard 1.5s infinite alternate;
}

@keyframes pulseCard {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  100% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

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

.animal-icon {
  font-size: 2.2rem;
  background: #f8fafc;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
}

.animal-title {
  font-weight: 800;
  font-size: 1rem;
  color: #1e293b;
}

.animal-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.animal-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.animal-status {
  font-size: 0.8rem;
  font-weight: 700;
  color: #d97706;
}

.animal-status.text-success {
  color: #16a34a;
}

.progress-bar-small {
  width: 110px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-small .fill {
  height: 100%;
  background: #22c55e;
  transition: width 0.3s;
}

/* ==========================================================================
   Quests Component
   ========================================================================== */
.quests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quest-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.quest-card.quest-completed {
  border-color: #22c55e;
  background: #f0fdf4;
}

.quest-card.quest-claimed {
  opacity: 0.65;
  background: #f8fafc;
}

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

.quest-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #1e293b;
}

.quest-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.quest-rewards {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.quest-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.quest-progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  transition: width 0.3s;
}

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

.quest-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

/* Automations */
.auto-card, .boost-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.auto-plant-select-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.boost-card.boost-active {
  border-color: #f59e0b;
  background: #fffbeb;
}

.boost-header { display: flex; align-items: center; gap: 10px; }
.boost-icon { font-size: 1.8rem; }
.auto-title, .boost-title { font-weight: 800; font-size: 0.95rem; }
.auto-desc, .boost-desc { font-size: 0.75rem; color: var(--text-muted); }
.auto-action, .boost-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.boost-status { font-size: 0.78rem; font-weight: 800; color: #0284c7; }

/* ==========================================================================
   Global Chat Component
   ========================================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.chat-bubble {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 85%;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.chat-bubble-self {
  background: #dcfce7;
  border-color: #86efac;
  align-self: flex-end;
}

.chat-sender-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.chat-avatar-emoji { font-size: 1.1rem; }
.chat-avatar-img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.chat-sender-name { font-weight: 800; font-size: 0.8rem; color: #1e293b; }
.chat-lvl-tag { background: #e0f2fe; color: #0369a1; font-size: 0.65rem; font-weight: 800; padding: 1px 4px; border-radius: 6px; }
.chat-clan-tag { background: #fef08a; color: #854d0e; font-size: 0.65rem; font-weight: 800; padding: 1px 4px; border-radius: 6px; }
.chat-time { font-size: 0.65rem; color: #94a3b8; margin-left: auto; }
.chat-text { font-size: 0.85rem; color: #334155; word-break: break-word; }

.chat-input-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.chat-input-bar input {
  flex: 1;
}

/* ==========================================================================
   Clans Component
   ========================================================================== */
.clan-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.clan-item-header { display: flex; align-items: center; gap: 10px; }
.clan-item-badge { font-size: 2.2rem; }
.clan-item-name { font-weight: 800; font-size: 0.95rem; }
.clan-item-desc { font-size: 0.75rem; color: var(--text-muted); }
.clan-item-meta { font-size: 0.7rem; color: #64748b; font-weight: 600; }

.my-clan-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f0fdf4, #e8f5e9);
  border: 2px solid #86efac;
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.clan-badge-huge { font-size: 3.5rem; }
.clan-title-row { display: flex; align-items: center; gap: 8px; }
.clan-level-badge { background: #22c55e; color: white; padding: 2px 8px; border-radius: 10px; font-weight: 800; font-size: 0.75rem; }
.clan-perk-box { background: white; padding: 6px 10px; border-radius: 8px; font-size: 0.8rem; margin-top: 6px; border: 1px solid #bbf7d0; }

.clan-treasury-box {
  background: #fffbeb;
  border: 1px solid #fde047;
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Auth & Profile Component
   ========================================================================== */
.auth-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-divider {
  text-align: center;
  position: relative;
  margin: 14px 0;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
}

.inbox-alert {
  background: #eff6ff;
  border: 1.5px dashed #3b82f6;
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 0.82rem;
  color: #1e3a8a;
  margin-top: 10px;
}

.verification-code-badge {
  display: inline-block;
  background: #2563eb;
  color: white;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 2px;
  margin-top: 4px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8f5e9;
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-custom-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-emoji-large { font-size: 3rem; }

.preset-avatars-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.preset-avatar-btn {
  font-size: 1.6rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  padding: 6px;
  transition: all 0.2s;
}

.preset-avatar-btn:hover {
  background: #e2e8f0;
  transform: scale(1.1);
}

/* Daily Rewards */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.daily-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.daily-card.daily-current {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.daily-card.daily-claimed { opacity: 0.5; background: #f1f5f9; }
.daily-day { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.daily-icon { font-size: 1.6rem; }
.daily-reward-text { font-size: 0.7rem; font-weight: 700; }
.daily-check { font-size: 0.65rem; color: #16a34a; font-weight: 800; }

/* Toasts */
#toast-container {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: white;
  color: #1e293b;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: all;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid #3b82f6;
  max-width: 320px;
}

.toast.toast-success { border-left-color: #22c55e; }
.toast.toast-error { border-left-color: #ef4444; }
.toast.toast-warning { border-left-color: #f59e0b; }
.toast.fade-out { animation: slideOutRight 0.3s ease forwards; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Floating Feedback Text */
.floating-text {
  position: fixed;
  pointer-events: none;
  font-weight: 800;
  font-size: 1.05rem;
  z-index: 10000;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  animation: floatUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.floating-xp { color: #38bdf8; }
.floating-coin { color: #fbbf24; }
.floating-harvest { color: #4ade80; }
.floating-water { color: #60a5fa; }
.floating-info { color: #f8fafc; }

@keyframes floatUp {
  0% { transform: translate(-50%, 0) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -60px) scale(1.1); opacity: 0; }
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 10px;
  font-size: 0.9rem;
}

/* Leaderboard Styles */
.player-rank-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.leaderboard-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.leaderboard-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.leaderboard-item.is-self {
  background: #f0fdf4;
  border-color: #22c55e;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.leaderboard-rank {
  font-size: 1.1rem;
  font-weight: 800;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e2e8f0;
  color: #475569;
}

.leaderboard-rank.rank-1 {
  background: linear-gradient(135deg, #fef08a, #facc15);
  color: #854d0e;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.4);
}

.leaderboard-rank.rank-2 {
  background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
  color: #334155;
  box-shadow: 0 2px 6px rgba(203, 213, 225, 0.4);
}

.leaderboard-rank.rank-3 {
  background: linear-gradient(135deg, #fed7aa, #fb923c);
  color: #9a3412;
  box-shadow: 0 2px 6px rgba(251, 146, 60, 0.4);
}

.leaderboard-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #cbd5e1;
  background: white;
}

.leaderboard-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.leaderboard-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.leaderboard-stat-chip {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
  color: #334155;
}
