/* ===== GLOBAL ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a, #1e293b);
  background-size: 300% 300%;
  animation: bgMove 10s ease infinite;
  color: white;
  overflow-x: hidden;
}

/* 🌌 BACKGROUND ANIMATION */
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== FADE-IN PAGE ===== */
body {
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#38bdf8, #22c55e);
  border-radius: 10px;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px;
  height: 100vh;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(15px);
  padding: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.sidebar h2 {
  color: #38bdf8;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #38bdf8;
}

/* ===== SIDEBAR BUTTON ===== */
.sidebar button {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  background: transparent;
  border: none;
  color: white;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.sidebar button:hover {
  background: rgba(56,189,248,0.2);
  transform: translateX(8px);
  box-shadow: 0 0 10px #38bdf8;
}

/* ===== MAIN ===== */
.main {
  flex: 1;
  padding: 20px;
  animation: slideUp 0.6s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== CARDS ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(15px);
  padding: 20px;
  border-radius: 15px;
  transition: all 0.4s ease;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

/* ✨ GLOW EFFECT */
.card::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, transparent, rgba(56,189,248,0.3), transparent);
  transform: rotate(25deg);
  top: -100%;
  left: -100%;
  transition: 0.6s;
}

.card:hover::before {
  top: 100%;
  left: 100%;
}

.card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 0 25px rgba(56,189,248,0.5);
}

/* ===== BUTTONS ===== */
button {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  border: none;
  padding: 10px 15px;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* 🔥 RIPPLE EFFECT */
button::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: scale(0);
  transition: 0.5s;
}

button:active::after {
  width: 200px;
  height: 200px;
  transform: scale(1);
  opacity: 0;
}

button:hover {
  transform: scale(1.07);
  box-shadow: 0 0 15px #22c55e;
}

/* ===== INPUTS ===== */
input, textarea, select {
  background: rgba(30, 41, 59, 0.6);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px;
  transition: 0.3s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 10px #38bdf8;
  transform: scale(1.02);
}

/* ===== TABLE ===== */
table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  animation: fadeIn 0.8s ease;
}

tr {
  transition: 0.3s;
}

tr:hover {
  background: rgba(56,189,248,0.1);
  transform: scale(1.01);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 10px;
  background: linear-gradient(to right, #38bdf8, #22c55e);
  animation: loadBar 2s ease;
}

@keyframes loadBar {
  from { width: 0; }
}

/* ===== STATUS COLORS ===== */
.ready { color: #22c55e; text-shadow: 0 0 8px #22c55e; }
.average { color: #facc15; text-shadow: 0 0 8px #facc15; }
.weak { color: #ef4444; text-shadow: 0 0 8px #ef4444; }

/* ===== FLOATING ANIMATION ===== */
.card {
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }
}