@font-face {
  font-family: "Poppins";
  src: url("font/Poppins-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1d4ed8 100%);
  background-size: 200% 200%;
  animation: loadingBgShift 3s ease infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

@keyframes loadingBgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 64px;
  height: 64px;
  position: relative;
}

.loading-spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-spinner::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px solid rgba(255,255,255,0.15);
  border-bottom-color: rgba(255,255,255,0.85);
  border-left-color: rgba(255,255,255,0.85);
  border-radius: 50%;
  animation: spin 1.4s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: loadingTextPulse 1.4s ease-in-out infinite;
  opacity: 0.9;
}

@keyframes loadingTextPulse {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.registration-box {
  background: linear-gradient(135deg, #2563eb 0%, #0a54f5 100%);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  color: white;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.registration-box h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.registration-box p {
  margin-bottom: 30px;
  opacity: 0.9;
}

.registration-box .input-group {
  text-align: left;
}

.registration-box .input-group label {
  color: white;
  font-weight: 600;
}

.registration-box input {
  background: rgba(255, 255, 255, 0.95);
}

.registration-box .btn {
  background: white;
  color: #2563eb;
  font-weight: 700;
  width: 100%;
}

.registration-box .btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.registration-error {
  color: #ffeb3b;
  font-size: 0.9rem;
  margin-top: 8px;
  min-height: 20px;
  font-weight: 500;
}

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

:root {
  color-scheme: only light;
}

@media (max-width: 500px) {
  .idol-card {
    width: 100%;
  }
}

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

.navbar {
  width: 100%;
  background: linear-gradient(100deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(37,99,235,0.28);
  border-bottom: 1.5px solid rgba(255,255,255,0.12);
  gap: 12px;
}

.navbar a.active {
  border-bottom: none;
}

.nav-logo {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-links li a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.22s ease;
  white-space: nowrap;
  position: static;
}

.nav-links li a::after {
  display: none;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #fff;
  background: rgba(255,255,255,0.16);
  transform: none;
  opacity: 1;
}

.hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hamburger .bar {
  display: block;
  width: 26px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

@media (max-width: 850px) {
  .nav-links { gap: 2px; }
  .nav-links li a { font-size: 0.82rem; padding: 5px 9px; }
  .nav-logo { font-size: 0.95rem; }
}

@media (max-width: 700px) {
  .hamburger {
    display: flex;
    order: 2;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: linear-gradient(100deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 12px 16px 16px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 999;
    border-bottom: 2px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 32px rgba(29,78,216,0.35);
  }

  body.nav-open .nav-links {
    display: flex;
    animation: navSlideDown 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .nav-links li a {
    color: #fff;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 10px;
    display: block;
    width: 100%;
    text-align: left;
  }

  .nav-links li a:hover,
  .nav-links li a.active {
    background: rgba(255,255,255,0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
  }

  body.nav-open .hamburger[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  body.nav-open .hamburger[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .hamburger[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  margin: 0;
  padding: 20px;
  color: #fff;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body.content-hidden .navbar,
body.content-hidden .main-layout,
body.content-hidden .header1,
body.content-hidden .comments-container,
body.content-hidden .site-footer {
  opacity: 0;
}

body.loaded .navbar,
body.loaded .main-layout,
body.loaded .header1,
body.loaded .comments-container,
body.loaded .site-footer {
  opacity: 1;
  transition: opacity 0.7s ease;
}

body::-webkit-scrollbar {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url("images/Sphere_Stage_\(Exterior\)_Full.webp") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  filter: blur(8px) brightness(0.72);
  z-index: -1;
  will-change: auto;
}

.site-footer {
  margin-top: 60px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2240 100%);
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(to right, #00e2a5, #7dff86);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, #00e2a5, #7dff86);
  border-radius: 2px;
  opacity: 0.5;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-disclaimer {
  margin: 0;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer-disclaimer strong {
  color: #cbd5e1;
}

.footer-contact {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.footer-discord {
  font-weight: 600;
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
}

.h1-title {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: linear-gradient(to right, #00e2a5, #0affb7, #7dff86);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#idol-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  max-width: 3000px;
  margin: 0 auto;
}

.idol-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.idol-card {
  background: #fff;
  border: 4px solid #d1d5db;
  border-radius: 12px;
  width: 180px;
  height: 430px;
  padding-bottom: 2.5rem;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.idol-card.rank-changed {
  animation: rankChangeHighlight 0.8s ease-out;
}

@keyframes rankChangeHighlight {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  25% {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(96, 165, 250, 0.5);
    border-color: #60a5fa;
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(96, 165, 250, 0.4);
  }
  75% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
}

.idol-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.idol-name {
  text-align: center;
  margin-top: 4px;
  font-weight: 500;
  color: #374151;
}

.idol-description {
  text-align: center;
  margin-top: 4px;
  font-weight: 300;
  color: #111827;
  padding: 0 3px;
  font-size: 0.9rem;
}

.combo {
  text-align: center;
  margin-top: 8px;
  font-size: 25px;
  font-weight: bold;
  text-transform: uppercase;
  color: white;
  background: linear-gradient(to right, #f97316, #dc2626);
  padding: 2px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.combo.updated {
  animation: comboUpdate 0.6s ease-out;
}

@keyframes comboUpdate {
  0% {
    transform: scale(1);
    background: linear-gradient(to right, #f97316, #dc2626);
  }
  25% {
    transform: scale(1.15) translateY(-3px);
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
  }
  50% {
    transform: scale(1.2) translateY(-5px);
    background: linear-gradient(to right, #fbbf24, #f59e0b);
  }
  75% {
    transform: scale(1.1) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
    background: linear-gradient(to right, #f97316, #dc2626);
  }
}

.ribbon {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  padding: 2px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ribbon.rank-up {
  animation: ribbonRankUp 0.8s ease-out;
}

.ribbon.rank-down {
  animation: ribbonRankDown 0.8s ease-out;
}

@keyframes ribbonRankUp {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  15% {
    transform: translateX(-50%) translateY(-15px) scale(1.15) rotate(5deg);
  }
  30% {
    transform: translateX(-50%) translateY(-20px) scale(1.2) rotate(-5deg);
  }
  45% {
    transform: translateX(-50%) translateY(-15px) scale(1.15) rotate(3deg);
  }
  60% {
    transform: translateX(-50%) translateY(-8px) scale(1.1) rotate(-2deg);
  }
  80% {
    transform: translateX(-50%) translateY(-3px) scale(1.05) rotate(0deg);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes ribbonRankDown {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  15% {
    transform: translateX(-50%) translateY(15px) scale(0.9) rotate(-5deg);
  }
  30% {
    transform: translateX(-50%) translateY(20px) scale(0.85) rotate(5deg);
  }
  45% {
    transform: translateX(-50%) translateY(15px) scale(0.9) rotate(-3deg);
  }
  60% {
    transform: translateX(-50%) translateY(8px) scale(0.95) rotate(2deg);
  }
  80% {
    transform: translateX(-50%) translateY(3px) scale(0.98) rotate(0deg);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

.ribbon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.6) 45%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.6) 55%,
    rgba(255, 255, 255, 0) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shine 2.5s ease-in-out infinite;
  filter: blur(8px);
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
.ribbon.gold {
  background: linear-gradient(to right, #fde047, #facc15);
  color: #78350f;
}
.ribbon.silver {
  background: linear-gradient(to right, #d1d5db, #9ca3af);
  color: #111827;
}
.ribbon.bronze {
  background: linear-gradient(to right, #fb923c, #ea580c);
  color: white;
}
.ribbon.ten {
  background: linear-gradient(to right, #bfdbfe, #60a5fa);
  color: #1e3a8a;
}
.ribbon.other {
  background: linear-gradient(to right, #00e2a5, #0affb7 57%, #7dff86);
  color: #0f4054;
}

.new-label {
  position: absolute;
  top: -8px;
  left: -8px;
  background: linear-gradient(135deg, #ff3d00, #ff9100);
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transform: rotate(-10deg);
  border: 2px solid white;
  z-index: 5;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: rotate(-10deg) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: rotate(-10deg) scale(1.1);
  }
}

.details-btn {
  background: linear-gradient(to right, #34d399, #10b981);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  display: block;
  margin: 10px auto 0 auto;
  transition: 0.3s;
}

.details-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(to right, #059669, #047857);
}



.header1 {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  margin-top: 30px;
}

.header1 h1 {
  color: #1e293b;
  font-size: 28px;
  margin-bottom: 20px;
}

.profile-section {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.profile-pic-container {
  flex-shrink: 0;
}

.profile-pic-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  font-weight: 600;
  font-size: 32px;
  overflow: hidden;
  border: 3px solid #e2e8f0;
}

.profile-pic-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-inputs {
  flex: 1;
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  color: #475569;
  font-weight: 500;
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  color: #64748b;
  font-size: 14px;
}

.file-input-label:hover {
  background: #e2e8f0;
  border-color: #3b82f6;
  color: #3b82f6;
}

.btn {
  width: 100%;
  padding: 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn:hover {
  background: #2563eb;
}

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

.comments-container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comments-title {
  color: #1e293b;
  font-size: 20px;
  margin-bottom: 20px;
}

.comment {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: background 0.2s;
}

.comment:hover {
  background: #f8fafc;
}

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

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  background: #e0e7ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.author-name {
  font-weight: 600;
  color: #1e293b;
}

.comment-time {
  font-size: 12px;
  color: #64748b;
}

.comment-text {
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.note {
  text-align: center;
  margin-top: 15px;
  color: #64748b;
  font-size: 14px;
}

.file-name {
  font-size: 12px;
  color: #10b981;
  margin-top: 5px;
}

.comment-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #d1d5db;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #6b7280;
  position: relative;
  overflow: hidden;
}

.reaction-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.reaction-btn:hover::before {
  width: 100px;
  height: 100px;
}

.reaction-btn:hover {
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.reaction-btn:first-child::after {
  content: '↑';
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.reaction-btn:first-child:hover::after {
  transform: translateY(-2px);
}

.reaction-btn:first-child.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #60a5fa;
  color: #1e40af;
}

.reaction-btn:first-child.active::after {
  animation: likeJump 0.4s ease;
}

.reaction-btn:last-child::after {
  content: '↓';
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.reaction-btn:last-child:hover::after {
  transform: translateY(2px);
}

.reaction-btn:last-child.active {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #f87171;
  color: #b91c1c;
}

.reaction-btn:last-child.active::after {
  animation: dislikeJump 0.4s ease;
}

.reaction-btn span {
  min-width: 18px;
  text-align: center;
  position: relative;
  z-index: 1;
  font-weight: 600;
}

@keyframes likeJump {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.2);
  }
}

@keyframes dislikeJump {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(4px) scale(1.2);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

#usernameError {
  color: #dc2626;
  font-size: 13px;
  margin-top: 5px;
  font-weight: 600;
  padding: 8px 12px;
  background: #fee2e2;
  border-left: 3px solid #dc2626;
  border-radius: 4px;
  animation: slideDown 0.3s ease;
}

.comment-image-container {
  margin-top: 12px;
}

.comment-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
}

.comment-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 500px) {
  .comment-actions {
    gap: 8px;
  }
  
  .reaction-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  .reaction-btn::after {
    font-size: 14px;
  }
  
  .comment-image {
    max-height: 300px;
  }
}

.main-layout {
  display: flex;
  gap: 20px;
  max-width: 3200px;
  margin: 0 auto;
  align-items: flex-start;
  position: relative;
}

.loader-spinner {
  position: relative;
  width: 60px;
  height: 60px;
}

.loader-spinner::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: #60a5fa;
  border-right-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-spinner::after {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border: 3px solid transparent;
  border-bottom-color: #34d399;
  border-left-color: #10b981;
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.container {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.side-panel {
  position: fixed;
  top: 80px;
  right: -350px;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  pointer-events: none;
  z-index: 1001;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.side-panel::-webkit-scrollbar {
  display: none;
}

.side-panel.active {
  right: 20px;
  pointer-events: all;
}

.side-panel-content {
  padding: 20px;
  position: relative;
  z-index: 2;
}

.side-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.side-panel-header h2 {
  font-size: 1.2rem;
  color: #1e293b;
  margin: 0;
}

.side-panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-stats-btn {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s, transform 0.2s;
  color: #1e293b;
  font-size: 1rem;
  flex-shrink: 0;
}

.side-stats-btn:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: scale(1.07);
}

.side-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s;
}

.side-close-btn:hover {
  color: #dc2626;
}

.side-panel-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.side-panel-img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease;
  overflow: hidden;
}

.side-panel-img.slide-out-down {
  animation: imgSlideOutDown 0.2s ease forwards;
}

.side-panel-img.slide-in-down {
  animation: imgSlideInDown 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes imgSlideOutDown {
  0% { opacity: 1; transform: translateY(0) scaleY(1); clip-path: inset(0 0 0 0); }
  100% { opacity: 0; transform: translateY(12px) scaleY(0.96); clip-path: inset(0 0 100% 0); }
}

@keyframes imgSlideInDown {
  0% { opacity: 0; transform: translateY(-14px) scaleY(0.96); clip-path: inset(100% 0 0 0); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); clip-path: inset(0 0 0 0); }
}

.side-image-loader {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.side-info-section {
  padding: 12px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(129, 140, 248, 0.1));
  border-radius: 8px;
  border-left: 4px solid #60a5fa;
}

.side-description {
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.side-date-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.1));
  border-radius: 8px;
  border-left: 4px solid #fbbf24;
}

.side-date-icon {
  font-size: 1.2rem;
}

.side-date-text {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 700;
}

.side-card-stats {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  border-radius: 8px;
  border-left: 4px solid #22c55e;
}

.side-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.side-stat-item:nth-child(1) {
  animation: rainbowGlow 2s ease-in-out infinite;
}

.side-stat-item:nth-child(2) {
  animation: goldGlow 2s ease-in-out infinite;
}

@keyframes rainbowGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.6), 0 0 20px rgba(255, 0, 128, 0.4), 0 0 30px rgba(255, 0, 128, 0.2);
  }
  16.67% {
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.7), 0 0 25px rgba(255, 140, 0, 0.5), 0 0 35px rgba(255, 140, 0, 0.3);
  }
  33.33% {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7), 0 0 25px rgba(255, 215, 0, 0.5), 0 0 35px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.7), 0 0 25px rgba(64, 224, 208, 0.5), 0 0 35px rgba(64, 224, 208, 0.3);
  }
  66.67% {
    box-shadow: 0 0 15px rgba(65, 105, 225, 0.7), 0 0 25px rgba(65, 105, 225, 0.5), 0 0 35px rgba(65, 105, 225, 0.3);
  }
  83.33% {
    box-shadow: 0 0 15px rgba(147, 112, 219, 0.7), 0 0 25px rgba(147, 112, 219, 0.5), 0 0 35px rgba(147, 112, 219, 0.3);
  }
}

@keyframes goldGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 35px rgba(255, 215, 0, 0.6), 0 0 50px rgba(255, 215, 0, 0.4);
  }
}
.side-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.side-stat-value {
  font-size: 1.3rem;
  color: #1e293b;
  font-weight: 800;
  transition: color 0.3s ease;
  position: relative;
}

.side-stat-value.stat-updated {
  animation: statGreenPulse 1.8s ease forwards;
}

@keyframes statGreenPulse {
  0%   { color: #1e293b; }
  10%  { color: #16a34a; text-shadow: 0 0 8px rgba(22,163,74,0.6); }
  40%  { color: #16a34a; text-shadow: 0 0 12px rgba(22,163,74,0.5); }
  100% { color: #1e293b; text-shadow: none; }
}

.birthday-card {
  border-color: #f9a8d4 !important;
  box-shadow: 0 0 0 2px #f9a8d4, 0 4px 20px rgba(249,168,212,0.4) !important;
  animation: birthdayCardGlow 2.5s ease-in-out infinite;
  overflow: visible !important;
  height: 464px !important;
}

@keyframes birthdayCardGlow {
  0%, 100% { box-shadow: 0 0 0 2px #f9a8d4, 0 4px 20px rgba(249,168,212,0.35); }
  50%       { box-shadow: 0 0 0 3px #f472b6, 0 6px 28px rgba(244,114,182,0.55); }
}

.birthday-card .idol-card-content {
  padding-bottom: 2px;
}

.birthday-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fdf2f8 100%);
  background-size: 200% 100%;
  animation: bdayBannerShimmer 2.5s linear infinite;
  border-top: 1px solid rgba(244,114,182,0.3);
  border-radius: 6px;
  padding: 4px 6px 5px;
  margin: 6px 8px 0;
  position: relative;
  z-index: 3;
}

@keyframes bdayBannerShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.bday-cake {
  font-size: 0.85rem;
  animation: bdayCakeBounce 1.2s ease-in-out infinite;
}

.bday-cake:last-child {
  animation-delay: 0.4s;
}

@keyframes bdayCakeBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40%       { transform: translateY(-3px) rotate(-8deg); }
  70%       { transform: translateY(-1px) rotate(5deg); }
}

.bday-text {
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(90deg, #db2777, #ec4899, #f472b6, #ec4899, #db2777);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bdayTextFlow 2s linear infinite;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

@keyframes bdayTextFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.bday-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  border-radius: 8px;
  z-index: 2;
}

.bday-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  top: -6px;
  left: calc(var(--i) * 8.5% + 4%);
  background: hsl(calc(var(--i) * 30), 85%, 60%);
  animation: bdayDotFall calc(2s + var(--i) * 0.18s) ease-in calc(var(--i) * 0.22s) infinite;
  opacity: 0;
}

.bday-dot:nth-child(even) {
  width: 4px;
  height: 7px;
  border-radius: 2px;
}

@keyframes bdayDotFall {
  0%   { opacity: 0;   transform: translateY(0)     rotate(0deg);   }
  10%  { opacity: 1; }
  80%  { opacity: 0.7; }
  100% { opacity: 0;   transform: translateY(430px) rotate(360deg); }
}

@media (max-width: 1200px) {
  .main-layout {
    flex-direction: column;
  }

  .side-panel {
    position: fixed;
    top: 50%;
    right: -420px;
    transform: translateY(-50%);
    width: 90%;
    max-width: 400px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9998;
    border-radius: 12px;
    transition: right 0.3s ease;
  }

  .side-panel.active {
    right: 20px;
  }
}

@media (max-width: 500px) {
  .side-panel {
    max-width: 95%;
    right: -100%;
  }

  .side-panel.active {
    right: 2.5%;
  }

  .side-card-stats {
    gap: 8px;
    padding: 12px;
  }

  .side-stat-item {
    padding: 8px;
  }

  .side-stat-label {
    font-size: 0.75rem;
  }

  .side-stat-value {
    font-size: 1.1rem;
  }
}

.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.fade-out-right {
  animation: fadeOutRight 0.3s ease forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.3s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

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

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 3000px;
  margin: 0 auto 20px auto;
  padding: 15px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  gap: 20px;
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
}

.view-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.view-btn.active {
  background: linear-gradient(to right, #60a5fa, #3b82f6);
  color: white;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-controls label {
  color: #475569;
  font-weight: 600;
  font-size: 14px;
}

.sort-select {
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.sort-select:focus {
  outline: none;
  border-color: #60a5fa;
}

.sort-select:hover {
  border-color: #cbd5e1;
}

#idol-container.list-view {
  flex-direction: column;
  align-items: stretch;
}

#idol-container.list-view .idol-card {
  width: 100%;
  height: auto;
  min-height: 140px;
  display: grid;
  grid-template-columns: 80px 140px 1fr auto auto;
  grid-template-areas: "rank avatar content days details";
  align-items: center;
  padding: 16px 20px;
  gap: 20px;
  position: relative;
}

#idol-container.list-view .ribbon {
  grid-area: rank;
  position: static;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

#idol-container.list-view .ribbon::before {
  display: none;
}

#idol-container.list-view .idol-card img {
  grid-area: avatar;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#idol-container.list-view .idol-card-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  justify-content: center;
}

#idol-container.list-view .idol-name {
  position: static;
  text-align: left;
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  color: #1f2937;
}

#idol-container.list-view .combo {
  position: static;
  text-align: left;
  margin: 0;
  font-size: 1.4rem;
  padding: 8px 16px;
  display: inline-block;
  width: fit-content;
  border-radius: 6px;
}

#idol-container.list-view .idol-description {
  position: static;
  text-align: left;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 400;
}

#idol-container.list-view .details-btn {
  grid-area: details;
  position: static;
  width: 120px;
  padding: 12px 20px;
  flex-shrink: 0;
  margin: 0;
}

@media (max-width: 1100px) {
  #idol-container.list-view .idol-card {
    grid-template-columns: 70px 120px 1fr;
    grid-template-areas: 
      "rank avatar content"
      "rank avatar details";
    gap: 15px;
    padding: 15px;
  }

  #idol-container.list-view .ribbon {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }

  #idol-container.list-view .idol-card img {
    width: 120px;
    height: 120px;
  }

  #idol-container.list-view .idol-name {
    font-size: 1.3rem;
  }

  #idol-container.list-view .details-btn {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 600px) {
  #idol-container.list-view .idol-card {
    grid-template-columns: 60px 1fr;
    grid-template-areas: 
      "rank content"
      "avatar content"
      "avatar details";
    padding: 12px;
    gap: 12px;
  }

  #idol-container.list-view .ribbon {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }

  #idol-container.list-view .idol-card img {
    width: 100px;
    height: 100px;
  }

  #idol-container.list-view .idol-name {
    font-size: 1.1rem;
  }

  #idol-container.list-view .idol-description {
    font-size: 0.85rem;
  }

  #idol-container.list-view .combo {
    font-size: 1.2rem;
    padding: 6px 12px;
  }

  #idol-container.list-view .details-btn {
    width: 100%;
    padding: 10px;
  }
}

.card-variants {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  position: relative;
}

.variant-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.variant-image {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  border: 3px solid #e2e8f0;
  transition: all 0.3s ease;
  background: white;
  padding: 4px;
}

.variant-image.loading {
  opacity: 0.3;
}

.variant-option:hover .variant-image {
  border-color: #cbd5e1;
  transform: scale(1.05);
}

.variant-option.active .variant-image {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

.variant-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  transition: color 0.3s ease;
}

.variant-option.active .variant-label {
  color: #60a5fa;
}

.variant-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  display: none;
}

.variant-loader.active {
  display: block;
}

.variant-loader::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #60a5fa;
  border-right-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.variant-loader::after {
  content: "";
  position: absolute;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border: 2px solid transparent;
  border-bottom-color: #34d399;
  border-left-color: #10b981;
  border-radius: 50%;
  animation: spin 1.2s linear infinite reverse;
}

.reply-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #6b7280;
}

.reply-btn:hover {
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.reply-form {
  margin-top: 15px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #60a5fa;
}

.reply-input {
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 10px;
}

.reply-input:focus {
  outline: none;
  border-color: #60a5fa;
}

.reply-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.reply-cancel-btn,
.reply-submit-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.reply-cancel-btn {
  background: #e2e8f0;
  color: #475569;
}

.reply-cancel-btn:hover {
  background: #cbd5e1;
}

.reply-submit-btn {
  background: linear-gradient(to right, #60a5fa, #3b82f6);
  color: white;
}

.reply-submit-btn:hover {
  opacity: 0.9;
}

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

.comment-reply {
  margin-left: 50px;
  margin-top: 15px;
  border-left: 3px solid #e2e8f0;
  padding-left: 15px;
  background: #f8fafc;
}

.replies-container {
  margin-top: 10px;
}

.reply-count {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  background: #e0e7ff;
  color: #2563eb;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 500px) {
  .comment-reply {
    margin-left: 20px;
    padding-left: 10px;
  }
}

.records-panel {
  position: fixed;
  top: 80px;
  right: -500px;
  width: 420px;
  max-height: calc(100vh - 100px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  min-height: 0;
}

.records-panel.active {
  right: 360px;
  opacity: 1;
  pointer-events: all;
}

.records-panel-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: calc(100vh - 100px);
}

.records-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 2px solid #e2e8f0;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

.records-panel-header h2 {
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.records-close-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  font-size: 1.1rem;
  color: #ffffff;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.records-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.records-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  -ms-overflow-style: auto;
  min-height: 0;
}

.records-panel-body::-webkit-scrollbar {
  width: 4px;
}

.records-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.records-panel-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.records-panel-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.records-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  padding: 40px 20px;
  font-weight: 500;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-item {
  background: #f8fafc;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  padding: 14px 14px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.record-item:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}

.record-index {
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
  min-width: 24px;
  padding-top: 2px;
  letter-spacing: 0.5px;
}

.record-body {
  flex: 1;
  min-width: 0;
}

.record-cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.record-card-box {
  background: #ffffff;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.record-from {
  border-left: 3px solid #f97316;
}

.record-to {
  border-left: 3px solid #3b82f6;
}

.record-card-type {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.record-from .record-card-type {
  color: #ea580c;
}

.record-card-thumb {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
  background: white;
  padding: 3px;
  display: block;
}

.record-card-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 1.4rem;
  background: #f8fafc;
}

.record-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.record-card-date {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.record-arrow-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 72px;
}

.record-days-label {
  font-size: 0.7rem;
  font-weight: 800;
  background: linear-gradient(90deg, #f97316, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.record-arrow svg {
  width: 68px;
  height: 28px;
}

@media (max-width: 800px) {
  .records-panel {
    position: fixed;
    top: 50%;
    left: -100vw;
    right: auto;
    transform: translateY(-50%);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    z-index: 9999;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  }

  .records-panel.active {
    left: 5%;
    right: auto;
  }

  .record-cards {
    grid-template-columns: 1fr auto 1fr;
    gap: 5px;
  }

  .record-card-thumb {
    height: 64px;
  }

  .record-card-thumb--placeholder {
    height: 64px;
  }
}

@media (max-width: 500px) {
  .records-panel {
    width: 95%;
    max-width: unset;
  }

  .records-panel.active {
    left: 2.5%;
  }

  .record-cards {
    grid-template-columns: 1fr auto 1fr;
    gap: 4px;
  }

  .record-arrow-block {
    min-width: 52px;
  }

  .record-arrow svg {
    width: 52px;
    height: 18px;
  }

  .record-days-label {
    font-size: 0.65rem;
    letter-spacing: 0;
  }

  .record-card-thumb {
    height: 56px;
  }

  .record-card-thumb--placeholder {
    height: 56px;
  }
}
.bday-panel {
  border: 2px solid #f9a8d4 !important;
  box-shadow: 0 4px 32px rgba(244,114,182,0.28), 0 0 0 1px rgba(244,114,182,0.18) !important;
  background: linear-gradient(160deg, #fff 0%, #fdf2f8 40%, #fff 100%) !important;
}

.bday-panel-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  border-radius: 12px;
}

.bday-panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px 8px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #fce7f3 0%, #fbcfe8 30%, #f9a8d4 50%, #fbcfe8 70%, #fce7f3 100%);
  background-size: 200% auto;
  animation: bdayPanelHeaderFlow 3s linear infinite;
  border: 1px solid rgba(244,114,182,0.3);
}

@keyframes bdayPanelHeaderFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.bday-ph-text {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #be185d, #db2777, #ec4899, #db2777, #be185d);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bdayPanelTextFlow 2.2s linear infinite;
  white-space: nowrap;
}

@keyframes bdayPanelTextFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.bday-panel .side-panel-img {
  border: 2px solid #f9a8d4;
  box-shadow: 0 4px 20px rgba(244,114,182,0.25);
}

.bday-panel .side-panel-header {
  border-bottom-color: rgba(244,114,182,0.3);
}

.bday-panel #side-panel-name {
  background: linear-gradient(90deg, #be185d, #ec4899, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bday-panel .side-info-section {
  background: linear-gradient(135deg, rgba(252,231,243,0.6), rgba(251,207,232,0.4));
  border-left-color: #f472b6;
}

.bday-panel .side-date-section {
  background: linear-gradient(135deg, rgba(252,231,243,0.5), rgba(253,242,248,0.4));
  border-left-color: #f9a8d4;
}
.info-update-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(239,68,68,0.45), 0 0 0 1.5px rgba(255,255,255,0.18);
  pointer-events: none;
  z-index: 10;
  animation: infoBadgeFloat 2s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes infoBadgeFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}
.idol-card { animation: none !important; }

.idol-card { height: 458px; padding-bottom: 10px; }

.card-count-pills {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px 2px;
  flex-wrap: wrap;
}
.card-count-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: rgba(0,0,0,0.05);
  color: #374151;
  white-space: nowrap;
  gap: 1px;
}
.pill-num { font-weight: 800; }
.pill-num.pill-updated {
  color: #16a34a;
  animation: pillPulse 1.4s ease-in-out infinite;
}
@keyframes pillPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.6; transform:scale(1.18); }
}
#idol-container.list-view .card-count-pills { display: none; }

.new-star-badge,
.info-update-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  animation: badgeFloat 2.2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22), 0 0 0 1.5px rgba(255,255,255,0.2);
}
@keyframes badgeFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.badge-five {
  background: linear-gradient(135deg,#f0abfc,#c084fc,#818cf8,#38bdf8,#34d399,#fbbf24,#fb923c,#f472b6);
  background-size: 300% 300%;
  animation: badgeFloat 2.2s ease-in-out infinite, rainbowShift 3s linear infinite;
}
@keyframes rainbowShift {
  0%  { background-position: 0%   50%; }
  50% { background-position: 100% 50%; }
  100%{ background-position: 0%   50%; }
}
.badge-four  { background: linear-gradient(135deg,#fde68a,#f59e0b,#d97706); box-shadow: 0 2px 10px rgba(245,158,11,0.5),0 0 0 1.5px rgba(255,255,255,0.22); }
.badge-three { background: linear-gradient(135deg,#60a5fa,#3b82f6,#1d4ed8); box-shadow: 0 2px 10px rgba(59,130,246,0.45),0 0 0 1.5px rgba(255,255,255,0.22); }
.info-update-badge { background: linear-gradient(135deg,#f59e0b,#ef4444); box-shadow: 0 2px 8px rgba(239,68,68,0.4),0 0 0 1.5px rgba(255,255,255,0.2); }

.fab-stack {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 900;
}
.fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
  flex-shrink: 0;
}
.fab-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.fab-settings { background: linear-gradient(135deg,#475569,#334155); }
.fab-settings.fab-settings-active { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.fab-top {
  background: linear-gradient(135deg,#3b82f6,#6366f1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}
.fab-top.fab-top-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.fab-top.fab-top-visible:hover { transform: translateY(-2px) scale(1.1); }

.settings-panel {
  position: fixed;
  bottom: 84px;
  right: 28px;
  width: 244px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.settings-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.settings-panel-inner { padding: 16px; }
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #f1f5f9;
}
.settings-title { font-size: 0.9rem; font-weight: 800; color: #1e293b; letter-spacing: 0.3px; }
.settings-close-btn {
  background: none; border: none; cursor: pointer;
  color: #94a3b8; font-size: 1rem; line-height: 1;
  padding: 2px 4px; border-radius: 4px; transition: color 0.15s;
}
.settings-close-btn:hover { color: #ef4444; }
.settings-section { margin-bottom: 14px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-label { font-size: 0.68rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }

.settings-ui-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #374151;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  text-align: left;
}
.settings-ui-toggle:hover { background: #f1f5f9; border-color: #cbd5e1; }
.settings-ui-toggle.ui-toggle-active {
  background: linear-gradient(135deg,rgba(99,102,241,0.1),rgba(139,92,246,0.1));
  border-color: #6366f1;
  color: #4f46e5;
}

.settings-view-toggle {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
}
.settings-view-toggle .view-btn {
  flex: 1; background: transparent; border: none;
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  color: #64748b; font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background 0.18s, color 0.18s; font-family: inherit;
}
.settings-view-toggle .view-btn:hover { background: #e2e8f0; color: #1e293b; }
.settings-view-toggle .view-btn.active { background: linear-gradient(to right,#60a5fa,#3b82f6); color: #fff; }

.settings-select {
  width: 100%; padding: 8px 10px;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  background: #fff; color: #1e293b;
  font-family: inherit; font-weight: 600; font-size: 0.82rem;
  cursor: pointer; transition: border-color 0.2s; appearance: auto;
}
.settings-select:focus { outline: none; border-color: #60a5fa; }

.side-panel { z-index: 9000; }

body.focus-mode .navbar,
body.focus-mode .header1,
body.focus-mode .comments-container,
body.focus-mode .site-footer { display: none !important; }
.info-update-badge { display: none !important; }

#idol-container.compact-mode {
  gap: 10px;
}

#idol-container.compact-mode .idol-card {
  width: 120px;
  height: 195px;
  padding-bottom: 6px;
  border-width: 3px;
}

#idol-container.compact-mode .idol-card img {
  height: 130px;
  border-radius: 6px;
}

#idol-container.compact-mode .idol-card-content {
  padding: 0 4px;
}

#idol-container.compact-mode .idol-name {
  font-size: 0.72rem;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#idol-container.compact-mode .combo {
  font-size: 14px;
  margin-top: 4px;
  padding: 1px 2px;
  border-radius: 3px;
}

#idol-container.compact-mode .idol-description,
#idol-container.compact-mode .details-btn,
#idol-container.compact-mode .card-count-pills,
#idol-container.compact-mode .birthday-banner,
#idol-container.compact-mode .bday-confetti {
  display: none !important;
}

#idol-container.compact-mode .ribbon {
  font-size: 9px;
  width: 72px;
  padding: 1px;
}

#idol-container.compact-mode .new-star-badge {
  font-size: 0.48rem;
  padding: 2px 5px;
  top: 4px;
  right: 4px;
}

#idol-container.compact-mode.list-view .idol-card {
  width: 100%;
  height: auto;
  min-height: 70px;
  grid-template-columns: 56px 80px 1fr;
  grid-template-areas: "rank avatar content";
  padding: 10px 14px;
  gap: 12px;
}

#idol-container.compact-mode.list-view .idol-card img {
  width: 80px;
  height: 70px;
}

#idol-container.compact-mode.list-view .ribbon {
  width: 56px;
  height: 56px;
  font-size: 1.1rem;
}

#idol-container.compact-mode.list-view .idol-name {
  font-size: 1.1rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

#idol-container.compact-mode.list-view .combo {
  font-size: 14px;
}