/* ============================================================
   👤 PROFIILISIVUN BRÄNDITYYLI (#2B2B2B & #F5F1E8)
   ============================================================ */
#tab-profiili .rules-card {
  background: #F5F1E8 !important;
  border: 2px solid #2B2B2B !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

#tab-profiili .rules-card-header {
  background: #2B2B2B !important;
  border-bottom: 2px solid #2B2B2B !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

#tab-profiili .rules-card-header h3,
#tab-profiili .rules-card-header div,
#tab-profiili .rules-card-header span {
  color: #F5F1E8 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
}

#tab-profiili .rules-card-body h3:not(#myProfileCard *),
#tab-profiili .rules-card-body h4:not(#myProfileCard *),
#tab-profiili .rules-card-body p:not(#myProfileCard *),
#tab-profiili .rules-card-body label:not(#myProfileCard *),
#tab-profiili .rules-card-body span:not(#myProfileCard *):not(.notif-dot-top):not(.spark),
#tab-profiili .rules-card-body div:not(#myProfileCard *):not(.plaque-rivet) {
  color: #2B2B2B !important;
  text-shadow: none !important;
}

#tab-profiili a:not(#myProfileCard *) {
  color: #8f4954 !important;
  text-shadow: none !important;
}

#tab-profiili .report-field-label {
  color: #2B2B2B !important;
}

#tab-profiili .friend-card-item {
  background: #F5F1E8 !important;
  border: 1.5px solid #2B2B2B !important;
}

#tab-profiili .friend-card-item:hover {
  background: #ffffff !important;
  border-color: #2B2B2B !important;
}

#tab-profiili .friend-name-text {
  color: #2B2B2B !important;
}

#tab-profiili .achievement-card {
  background: #F5F1E8 !important;
  border: 1.5px solid #2B2B2B !important;
}

#tab-profiili .achievement-card .achievement-name,
#tab-profiili .achievement-card div {
  color: #2B2B2B !important;
}

#tab-profiili .achievement-group h4 {
  color: #2B2B2B !important;
}

#tab-profiili .btn-secondary {
  background: #F5F1E8 !important;
  color: #2B2B2B !important;
  border: 1.5px solid #2B2B2B !important;
  border-radius: 12px !important;
  font-weight: 600;
  transition: all 0.2s ease !important;
}

#tab-profiili .btn-secondary:hover {
  background: #2B2B2B !important;
  color: #F5F1E8 !important;
  border-color: #2B2B2B !important;
}

.btn-landing-join {
  background: #2B2B2B linear-gradient(180deg, #3A3A3A 0%, #2B2B2B 100%) !important;
  color: #F5F1E8 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 14px 28px !important;
  border-radius: 12px !important; 
  border: 1px solid #171717 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  display: inline-block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.2s ease !important;
}

.btn-landing-join:hover {
  background: linear-gradient(180deg, #484848 0%, #333333 100%) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

/* 8. SAAVUTUKSET (ACHIEVEMENTS) */
.achievement-group h4 { font-size: 11px; color: #2B2B2B; margin: 10px 0 8px 0; text-transform: uppercase; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.achievement-card { border: 1px solid #2B2B2B; border-radius: 8px; padding: 8px 4px; text-align: center; background: #F5F1E8; position: relative; }
.achievement-card.unlocked { border-color: #46A28B; background: #F5F1E8; }
.achievement-card.locked { opacity: 0.45; filter: grayscale(100%); background: #F5F1E8; }
.achievement-icon { margin-bottom: 2px; display: flex; align-items: center; justify-content: center; min-height: 22px; }
.achievement-name { font-size: 9px; font-weight: 700; line-height: 1.1; }

.ach-svg-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 1.5px 3px rgba(0, 0, 0, 0.22));
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
}

.achievement-card:hover .ach-svg-icon {
  transform: scale(1.15) rotate(4deg);
}

.achievement-card.unlocked .ach-svg-icon {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.achievement-card.card-blurred { position: relative; overflow: hidden; cursor: pointer; opacity: 1 !important; }
.achievement-card.card-blurred .achievement-content-blur { filter: blur(2.5px) grayscale(100%); opacity: 0.4; pointer-events: none; }
.ach-more-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(43, 43, 43, 0.75); color: #F5F1E8; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-size: 15px; font-weight: 700; border-radius: 7px; z-index: 5; transition: background 0.2s ease; }
.achievement-card.card-blurred:hover .ach-more-overlay { background: rgba(43, 43, 43, 0.88); }
.ach-more-sub { font-size: 8px; font-family: 'Inter', sans-serif; font-weight: 500; opacity: 0.9; margin-top: 1px; }

/* 9. FIIDI & KOMMENTIT */
.feed-empty-state { 
  text-align: center !important; 
  padding: 24px 18px !important; 
  color: #2B2B2B !important; 
  font-size: 13px !important; 
  line-height: 1.55 !important;
  background: #F5F1E8 !important; 
  border: 2px dashed #2B2B2B !important; 
  border-radius: 12px !important; 
  margin-top: 10px !important; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  font-weight: 500 !important;
}

/* 🪵 BRÄNDINMUKAINEN SUBNAV SÄILIÖ JA PAINIKKEET (OMA SYÖTE / JULKINEN) */
.feed-subnav-container {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 16px !important;
  background: #2B2B2B !important;
  padding: 5px !important;
  border-radius: 12px !important;
  border: 2px solid #2B2B2B !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
}

.feed-subnav-btn {
  flex: 1 !important;
  padding: 10px 14px !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #F5F1E8 !important;
  background: #2B2B2B !important;
  border: 1px solid rgba(245, 241, 232, 0.2) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.feed-subnav-btn:hover {
  color: #ffffff !important;
  background: #3A3A3A !important;
  border-color: #F5F1E8 !important;
  transform: translateY(-1px) !important;
}

.feed-subnav-btn.active {
  color: #2B2B2B !important;
  background: #F5F1E8 !important;
  border: 1px solid #F5F1E8 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  text-shadow: none !important;
}

/* 📜 SÄÄNTÖKORTIT - BRÄNDINMUKAINEN #2B2B2B ULKOREUNA JA PUHDAS #F5F1E8 SISÄPUOLI */
.rules-card,
.app-container[data-theme="kimble"] .rules-card,
.app-container[data-theme="yatzy"] .rules-card,
.app-container[data-theme="alias"] .rules-card,
.app-container[data-theme="afrikan_tahti"] .rules-card {
 background: #F5F1E8 !important;
 border: 3px solid #2B2B2B !important;
 border-radius: 14px !important;
 padding: 0 !important;
 margin-bottom: 20px !important;
 box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
 position: relative !important;
 overflow: visible !important;
 box-sizing: border-box !important;
}

.rules-card::before {
  display: none !important;
}

/* Otsikkopalkit ohennettu 18.8.2026: täyte 12px -> 7px. Palkkeja on sivulla
   useita peräkkäin, ja ne veivät yhdessä otsikkotekstien kanssa kohtuuttoman
   osan näkyvästä tilasta - varsinkin puhelimella, jossa jokainen palkki työntää
   varsinaista sisältöä alemmas. Koskee kaikkia välilehtiä, jotta ulkoasu
   pysyy yhtenäisenä. */
.rules-card-header {
  background: #2B2B2B !important;
  padding: 7px 14px !important;
  border-bottom: 2px solid #2B2B2B !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  position: relative !important;
  z-index: 2 !important;
}

.feed-card {
  background: #F5F1E8 !important;
  border: 2px solid #2B2B2B !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin-bottom: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  box-sizing: border-box !important;
}

.feed-card-header {
  background: #2B2B2B !important;
  padding: 10px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid #2B2B2B !important;
}

.feed-card-header-title { 
  font-family: 'Oswald', sans-serif !important; 
  font-size: 13px !important; 
  font-weight: 700 !important; 
  letter-spacing: 0.8px !important; 
  color: #F5F1E8 !important; 
  text-shadow: none !important; 
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.feed-game-icon {
  width: 16px !important;
  height: 16px !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.feed-card-body {
  padding: 12px 14px !important;
  position: relative !important;
  z-index: 2 !important;
  color: #2B2B2B !important;
  background: #F5F1E8 !important;
}

.feed-card-kimble { border-left: 5px solid #37467b !important; }
.feed-card-kimble .feed-card-header-title { color: #F5F1E8 !important; text-shadow: none !important; }

.feed-card-yatzy { border-left: 5px solid #2c705f !important; }
.feed-card-yatzy .feed-card-header-title { color: #F5F1E8 !important; text-shadow: none !important; }

.feed-card-alias { border-left: 5px solid #8f4954 !important; }
.feed-card-alias .feed-card-header-title { color: #F5F1E8 !important; text-shadow: none !important; }

.feed-card-afrikan_tahti { border-left: 5px solid #f1cb64 !important; }
.feed-card-afrikan_tahti .feed-card-header-title { color: #F5F1E8 !important; text-shadow: none !important; }

.feed-card-achievement { border-left: 5px solid #f1cb64 !important; }
.feed-card-announcement { 
 border-left: 5px solid #37467b !important; 
 position: sticky !important;
 top: 48px !important;
 z-index: 80 !important;
}
.feed-card-comment { border-left: 5px solid #37467b !important; }
.feed-card-comment { border-left: 5px solid #1c485c !important; }

.feed-card-anim { opacity: 0; animation: slideInUp 0.4s ease forwards; }

.reaction-bar { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #2B2B2B; align-items: center; }

.react-btn { 
  background: #F5F1E8; 
  border: 1.5px solid #2B2B2B; 
  font-size: 12px; 
  padding: 5px 9px; 
  border-radius: 8px; 
  cursor: pointer; 
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease; 
  display: flex; 
  align-items: center; 
  gap: 5px; 
  color: #2B2B2B; 
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.react-btn:hover { 
  background: #ffffff; 
  border-color: #2B2B2B;
  transform: translateY(-1px) scale(1.04);
  color: #2B2B2B;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.react-btn:active {
  transform: scale(0.92) !important;
}

.react-btn.active { 
  background: linear-gradient(180deg, #3A3A3A 0%, #2B2B2B 100%) !important; 
  color: #F5F1E8 !important; 
  border-color: #171717 !important; 
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(43, 43, 43, 0.4) !important;
}

/* Emojin elastinen hyppy kun luokka .active kytkeytyy */
.react-btn.active span:first-child {
  display: inline-block;
  animation: popEmoji 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes popEmoji {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.45); }
  100% { transform: scale(1); }
}


/* 📈 ELO-historiakäyrä (pelaajaprofiili) */
.elo-history-svg {
  width: 100%;
  height: 110px;
  display: block;
}

.elo-history-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 6px;
  font-size: 12px;
  color: #2B2B2B;
}

.elo-history-stats b {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #5f5f5f;
  margin-bottom: 1px;
}

.elo-history-empty {
  text-align: center;
  font-size: 12.5px;
  font-style: italic;
  color: #5f5f5f;
  padding: 20px 10px;
}
