﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  /* Primary colors: Blue, Red, Yellow */
  --primary: #3b82f6;      /* blue vibrant */
  --primary-600: #2563eb;  /* darker blue */
  --accent: #ef4444;       /* red vibrant */
  --accent-yellow: #fbbf24; /* yellow vibrant */
  --danger: #ef4444;
  --success: #22c55e;
  --card: #0b1220;
  --border: #1f2937;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  background: radial-gradient(ellipse 1400px 900px at 15% -10%, rgba(59,130,246,.25), transparent 65%), radial-gradient(ellipse 1000px 700px at 85% 10%, rgba(239,68,68,.22), transparent 55%), radial-gradient(ellipse 800px 600px at 50% 90%, rgba(251,191,36,.2), transparent 50%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated ambient overlay */
body::before {
  content: '';
  position: fixed;
  inset: -10% -20% -10% -20%;
  background: radial-gradient(ellipse 700px 500px at 20% 10%, rgba(59,130,246,.25), transparent 60%),
              radial-gradient(ellipse 600px 400px at 75% 20%, rgba(239,68,68,.25), transparent 60%),
              radial-gradient(ellipse 500px 350px at 50% 85%, rgba(251,191,36,.22), transparent 60%);
  filter: blur(8px) saturate(180%);
  animation: bgFloat 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* Animated particles background */
.particles-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(59,130,246,.9), rgba(239,68,68,.6));
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(59,130,246,.8), 0 0 30px rgba(251,191,36,.6);
  animation: floatParticle 20s linear infinite;
  opacity: 0;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 18s;
}

.particle:nth-child(2) {
  left: 25%;
  animation-delay: 2s;
  animation-duration: 22s;
}

.particle:nth-child(3) {
  left: 40%;
  animation-delay: 4s;
  animation-duration: 20s;
}

.particle:nth-child(4) {
  left: 55%;
  animation-delay: 1s;
  animation-duration: 24s;
}

.particle:nth-child(5) {
  left: 70%;
  animation-delay: 3s;
  animation-duration: 19s;
}

.particle:nth-child(6) {
  left: 15%;
  animation-delay: 5s;
  animation-duration: 21s;
}

.particle:nth-child(7) {
  left: 35%;
  animation-delay: 2.5s;
  animation-duration: 23s;
}

.particle:nth-child(8) {
  left: 50%;
  animation-delay: 4.5s;
  animation-duration: 18s;
}

.particle:nth-child(9) {
  left: 80%;
  animation-delay: 1.5s;
  animation-duration: 25s;
}

.particle:nth-child(10) {
  left: 90%;
  animation-delay: 3.5s;
  animation-duration: 22s;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) scale(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1.5) rotate(360deg);
    opacity: 0;
  }
}

@keyframes bgFloat {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-2%,2%,0) scale(1.03); }
  100% { transform: translate3d(2%,-2%,0) scale(1.02); }
}

.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 8px 32px rgba(0,0,0,.12), inset 0 -1px 0 rgba(255,255,255,.05);
  position: sticky; top: 0; z-index: 100;
  animation: slideDown 0.6s cubic-bezier(0.4,0,0.2,1);
}

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

.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; transition: transform 0.3s ease; }
.brand:hover { transform: scale(1.02); }
.brand .logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 12px rgba(59,130,246,.4); object-fit: contain; background: rgba(255,255,255,.05); padding: 4px; backdrop-filter: blur(4px); }
.brand .logo::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(45deg, transparent, rgba(255,255,255,.3), transparent); animation: shimmer 3s infinite; }

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.brand span { font-weight: 800; letter-spacing: .3px; font-size: 17px; background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,.8) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.user-chip { font-size: 14px; color: rgba(255,255,255,.8); font-weight: 500; padding: 8px 14px; background: rgba(255,255,255,.1); border-radius: 999px; border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(10px); }

.container { max-width: 1100px; margin: 32px auto; padding: 0 20px; animation: fadeInUp 0.8s cubic-bezier(0.4,0,0.2,1); position: relative; z-index: 10; }

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

.card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.05) inset;
  position: relative; overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent); }
.card:hover { transform: translateY(-4px); box-shadow: 0 28px 60px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.1) inset; border-color: rgba(255,255,255,.2); }
.card + .card { margin-top: 24px; }

.h1 { font-size: 32px; font-weight: 900; margin: 0 0 10px; background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,.85) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.5px; }
.h2 { font-size: 16px; font-weight: 500; color: rgba(255,255,255,.6); margin: 0 0 24px; line-height: 1.6; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.tile { background: rgba(255,255,255,.06); backdrop-filter: blur(16px) saturate(180%); border: 1px solid rgba(255,255,255,.12); padding: 24px; border-radius: 16px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); position: relative; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.tile::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(34,211,238,.1) 100%); opacity: 0; transition: opacity 0.3s ease; }
.tile:hover { transform: translateY(-6px) scale(1.02); border-color: rgba(99,102,241,.5); box-shadow: 0 16px 40px rgba(99,102,241,.25), 0 0 0 1px rgba(255,255,255,.15) inset; }
.tile:hover::before { opacity: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); backdrop-filter: blur(12px) saturate(180%); color: var(--text); padding: 11px 18px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 2px 8px rgba(0,0,0,.1); position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.1), transparent); opacity: 0; transition: opacity 0.3s ease; }
.btn:hover { background: rgba(255,255,255,.12); border-color: rgba(99,102,241,.5); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.1) inset; }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  background-size: 200% 200%;
  border-color: rgba(255,255,255,.2);
  color: #fff; font-weight: 700;
  box-shadow: 0 8px 24px rgba(59,130,246,.5), 0 0 0 1px rgba(255,255,255,.1) inset;
  animation: gradientShift 6s ease infinite;
}
.btn.primary:hover {
  transform: translateY(-3px) scale(1.04);
  background-position: 100% 0;
  box-shadow: 0 12px 32px rgba(239,68,68,.6), 0 0 0 1px rgba(255,255,255,.2) inset;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.btn.danger { background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%); border-color: rgba(255,255,255,.2); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(239,68,68,.35), 0 0 0 1px rgba(255,255,255,.1) inset; }
.btn.danger:hover { background: linear-gradient(135deg, #f87171 0%, #ef4444 100%); transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 32px rgba(239,68,68,.45), 0 0 0 1px rgba(255,255,255,.2) inset; }

.input { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); backdrop-filter: blur(12px) saturate(180%); color: var(--text); outline: none; font-size: 14px; font-family: inherit; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.input::placeholder { color: rgba(255,255,255,.35); }
.input:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.input:focus { border-color: var(--primary); background: rgba(255,255,255,.1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent), 0 4px 16px rgba(0,0,0,.12); transform: translateY(-1px); animation: glowPulse 1.8s ease-in-out infinite; }

@keyframes glowPulse {
  0% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 28%, transparent), 0 4px 16px rgba(0,0,0,.10); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent), 0 6px 20px rgba(0,0,0,.14); }
  100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 28%, transparent), 0 4px 16px rgba(0,0,0,.10); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  50% { transform: translateY(-8px) rotate(3deg) scale(1.05); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(59,130,246,.5), 0 0 0 1px rgba(255,255,255,.1) inset; }
  50% { transform: scale(1.02); box-shadow: 0 12px 32px rgba(239,68,68,.6), 0 0 0 2px rgba(255,255,255,.15) inset; }
}

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

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

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

.label { display: block; margin-bottom: 8px; color: rgba(255,255,255,.7); font-size: 14px; font-weight: 600; letter-spacing: 0.3px; }
.row { display: grid; gap: 16px; }

.center { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 40px 20px; width: 100%; }
.card.login { width: 100%; max-width: 480px; animation: fadeInScale 0.6s cubic-bezier(0.4,0,0.2,1); margin: 0 auto; }

@keyframes fadeInScale {
  from { transform: scale(0.95) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.table { width: 100%; border-collapse: separate; border-spacing: 0; background: rgba(255,255,255,.04); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.table thead th { background: rgba(255,255,255,.08); backdrop-filter: blur(12px); color: rgba(255,255,255,.85); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; position: sticky; top: 0; z-index: 10; }
.table tbody tr { transition: all 0.2s ease; }
.table tbody tr:hover { background: rgba(255,255,255,.06); }
.table tbody tr:last-child td { border-bottom: none; }

.small { font-size: 13px; color: rgba(255,255,255,.5); }
.spacer { height: 12px; }
.alert { padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); backdrop-filter: blur(12px) saturate(180%); color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.6; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.footer { color: rgba(255,255,255,.4); font-size: 13px; text-align: center; padding: 32px 20px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; background: rgba(0,0,0,.2); backdrop-filter: blur(12px); }

/* Rainbow animated text */
.rainbow-text {
  background: linear-gradient(90deg, 
    #3b82f6 0%, 
    #ef4444 25%, 
    #fbbf24 50%, 
    #3b82f6 75%, 
    #ef4444 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowShift 6s linear infinite;
  text-shadow: 0 0 30px rgba(59,130,246,.3);
}

.rainbow-text-secondary {
  background: linear-gradient(90deg, 
    #fbbf24 0%, 
    #ef4444 33%, 
    #3b82f6 66%, 
    #fbbf24 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowShift 8s linear infinite reverse;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .navbar { padding: 14px 16px; }
  .brand span { font-size: 15px; }
  .container { margin: 20px auto; padding: 0 16px; }
  .card { padding: 20px; border-radius: 16px; }
  .h1 { font-size: 26px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .table th, .table td { padding: 10px 8px; font-size: 13px; }
  .center { min-height: calc(100vh - 150px); padding: 30px 16px; }
}

@media (max-width: 480px) {
  .navbar { padding: 12px; }
  .nav-actions { gap: 8px; }
  .user-chip { display: none; }
  .btn { padding: 9px 14px; font-size: 13px; }
  .center { padding: 20px 12px; }
}
