/* ---------------- Root Variables ---------------- */
:root {
  --bg: #0f1724;
  --card: #0b1220;
  --accent1: #06b6d4;
  --accent2: #a78bfa;
  --muted: #94a3b8;
  --glass: rgba(255,255,255,0.04);
}

/* ---------------- Reset ---------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(circle at 10% 20%, rgba(7,89,133,0.14), transparent 10%),
              linear-gradient(180deg,#071124 0%, #061022 100%);
  color: #e6eef8;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Navbar ---------------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent1);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.logo span { color: #fff; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.nav-links li { display: inline-block; }
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  color: #e5e7eb;
  position: relative;
  transition: color 0.3s ease;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}
.nav-links a:hover { color: var(--accent1); }
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hamburger button */
.hamburger {
  display: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  user-select: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(0,0,0,0.9);
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    padding: 20px;
    animation: slideDown 0.5s ease forwards;
  }
  .nav-links li { text-align: center; }
  .nav-links.show { display: flex; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(6,182,212,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-position 0.5s;
  position: relative;
  overflow: hidden;
}
.btn:hover {
  transform: translateY(-3px) scale(1.05);
  background-position: right center;
  box-shadow: 0 12px 32px rgba(167,139,250,0.5);
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.2);
  transform: skewX(-20deg);
  transition: 0.5s;
}
.btn:hover::after { left: 100%; }

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn.ghost:hover {
  color: var(--accent2);
  border-color: var(--accent2);
}

.btn.pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(6,182,212,0.6); }
  70% { box-shadow: 0 0 0 15px rgba(6,182,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(6,182,212,0); }
}

.btn.confirm {
  padding: 16px 36px;
  font-size: 1.1rem;
  letter-spacing: 1px;
  border-radius: 14px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #a78bfa);
  background-size: 200% auto;
  animation: pulseBig 2s infinite;
}
@keyframes pulseBig {
  0% { box-shadow: 0 0 0 0 rgba(6,182,212,0.6); }
  70% { box-shadow: 0 0 0 25px rgba(6,182,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(6,182,212,0); }
}

/* ---------------- Cards ---------------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}
.card-compact {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.3s ease;
}
.card-compact:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* ---------------- Form Inputs ---------------- */
.form-input {
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease forwards;
}
@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}
.form-input:focus {
  border-color: var(--accent1);
  box-shadow: 0 0 12px rgba(6,182,212,0.5);
  background: rgba(255,255,255,0.05);
}

/* Placeholders for date/time */
input[type="date"]:before,
input[type="time"]:before {
  content: attr(placeholder);
  position: absolute;
  color: #9ca3af;
}
input[type="date"]:valid:before,
input[type="time"]:valid:before {
  display: none;
}

/* ---------------- Layout ---------------- */
.hero {
  max-width: 1120px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

/* ---------------- Role-Based Access Classes ---------------- */
.admin-only,
.doctor-only,
.patient-only {
  display: none;
}
.show-admin { display: block !important; }
.show-doctor { display: block !important; }
.show-patient { display: block !important; }

.role-loading {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ---------------- Special Effects ---------------- */
.pulse {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  position: relative;
  overflow: hidden;
}
.pulse::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s linear infinite;
}
@keyframes shimmer {
  to { left: 120%; }
}

.doctor {
  width: 260px;
  height: 260px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%   { transform: translateY(0) rotate(0); }
  50%  { transform: translateY(-15px) rotate(3deg); }
  100% { transform: translateY(0) rotate(0); }
}

/* ---------------- Footer ---------------- */
footer {
  max-width: 1120px;
  margin: 40px auto 10px auto;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; }
}
