/* CSS Variables for Theme */
:root {
  --bg: #121212;
  --header: #E0E0E0;
  --text: #E0E0E0;
  --text-secondary: #B0B0B0;
  --btn-bg: #888888;
  --btn-text: #121212;
  --card-bg: #1E1E1E;
  --border: #444444;
  --shadow: rgba(0, 0, 0, 0.5);
  --hover-bg: rgba(136, 136, 136, 0.15);
  --accent: #888888;
  --error: #ff6b6b;
  --success: #51cf66;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--header);
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-layout {
  display: flex;
  min-height: 100vh;
}

/* Navigation */
nav {
  width: 260px;
  background: var(--card-bg);
  padding: 2rem 0;
  box-shadow: 2px 0 10px var(--shadow);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.nav-header {
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--header);
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.nav-logo {
  max-width: 360px;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
}

.nav-links {
  list-style: none;
  padding: 0 1rem;
}

.nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--hover-bg);
  color: var(--header);
}

.nav-link.active {
  background: var(--hover-bg);
  color: var(--header);
  font-weight: 600;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
}

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: var(--header);
  font-size: 0.9rem;
}

.user-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 6px 24px var(--shadow);
  margin-bottom: 2rem;
  overflow: visible;
}

.card-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
}

/* Buttons — all use the rainbow-glow effect */
.btn {
  border: none;
  outline: none;
  color: var(--text);
  background: #1a1a1a;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 10px 22px;
  height: 42px;
}

.btn:before {
  content: '';
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  border-radius: 10px;
}

.btn:hover:before {
  opacity: 1;
}

.btn:active {
  color: #000;
}

.btn:after {
  z-index: -1;
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  left: 0;
  top: 0;
  border-radius: 10px;
}

.btn:active:after {
  background: transparent;
}

.btn-secondary {
  background: #1a1a1a;
}

.btn-secondary:after {
  background: #1a1a1a;
}

.btn-danger {
  background: #1a1a1a;
}

.btn-danger:after {
  background: #1a1a1a;
}

.btn-sm {
  height: 32px;
  padding: 4px 14px;
  font-size: 0.8rem;
}

.btn-refresh {
  height: 36px;
  padding: 6px 16px;
  font-size: 0.85rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 12px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  color: var(--header);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  color: var(--text);
  font-size: 0.9rem;
}

table:not(.schedule-table) tr:hover {
  background: var(--hover-bg);
}

tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status.scheduled {
  background: rgba(176, 176, 176, 0.15);
  color: #c0c0c0;
}

.status.confirmed {
  background: rgba(200, 200, 200, 0.15);
  color: #d0d0d0;
}

.status.completed {
  background: rgba(200, 200, 200, 0.15);
  color: #d0d0d0;
}

.status.active {
  background: rgba(0, 255, 133, 0.15);
  color: #00FF85;
}

.status.inactive {
  background: rgba(160, 160, 160, 0.1);
  color: #999999;
}

.status.draft {
  background: rgba(176, 176, 176, 0.1);
  color: #B0B0B0;
}

.status.published {
  background: rgba(200, 200, 200, 0.15);
  color: #d0d0d0;
}

.status.review {
  background: rgba(176, 176, 176, 0.12);
  color: #c0c0c0;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--header);
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.15);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

select.form-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888888' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select.form-input option {
  background: var(--card-bg);
  color: var(--text);
  padding: 8px;
}

/* Error and Success Messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-error {
  background: rgba(255, 107, 107, 0.1);
  color: var(--error);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.alert-success {
  background: rgba(81, 207, 102, 0.1);
  color: var(--success);
  border: 1px solid rgba(81, 207, 102, 0.3);
}

/* Landing Page */
.landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* Video Background */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.88);
  z-index: 1;
}

.landing-logo {
  max-width: 600px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.landing h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.landing p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* TOTP Pages */
.totp-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
}

.qr-code {
  text-align: center;
  margin: 2rem 0;
}

.qr-code img {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow);
}

.secret-backup {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.backup-codes {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.backup-codes h4 {
  margin-bottom: 0.5rem;
  color: var(--header);
}

.backup-codes ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.backup-codes li {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  padding: 0.25rem;
  background: var(--bg);
  border-radius: 4px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }
  
  nav {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1rem 0;
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .user-info {
    width: 100%;
  }
  
  .landing-logo {
    max-width: 90%;
    margin-bottom: 1.5rem;
  }
  
  .landing h1 {
    font-size: 2rem;
  }
  
  .landing p {
    font-size: 1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .table-container {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    padding: 0 0.5rem;
  }
  
  .nav-link {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
  
  .backup-codes ul {
    grid-template-columns: 1fr;
  }
  
  .youtube-carousel-container {
    padding: 1rem;
  }
  
  .video-card {
    min-width: 240px;
    max-width: 240px;
    width: 240px;
  }
  
  .video-thumbnail {
    width: 240px;
    height: 135px;
  }
  
  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--header);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* YouTube Carousel */
.youtube-carousel-container {
  margin-top: 9rem;
  width: 100%;
  max-width: 1000px;
  padding: 2rem;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px var(--shadow);
}

.youtube-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-track-container {
  overflow: hidden;
  flex: 1;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.3s ease;
}

.video-card {
  min-width: 280px;
  max-width: 280px;
  width: 280px;
  flex-shrink: 0;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(136, 136, 136, 0.25);
}

.video-thumbnail {
  width: 280px;
  height: 157.5px;
  object-fit: cover;
  object-position: center;
  display: block;
  flex-shrink: 0;
}

.video-info {
  padding: 1rem;
}

.video-title {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.6em;
}

.carousel-btn {
  background: #1a1a1a;
  color: var(--text);
  border: none;
  outline: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.2s ease;
  flex-shrink: 0;
  z-index: 10;
  position: relative;
  pointer-events: auto;
}

.carousel-btn:before {
  content: '';
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  border-radius: 50%;
}

.carousel-btn:after {
  z-index: -1;
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  left: 0;
  top: 0;
  border-radius: 50%;
}

.carousel-btn:hover:not(:disabled):before {
  opacity: 1;
}

.carousel-btn:active:not(:disabled) {
  color: #000;
}

.carousel-btn:active:not(:disabled):after {
  background: transparent;
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-btn:disabled:hover {
  transform: none;
}

/* Master Schedule Styles */
.master-schedule-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.day-schedule {
  background: rgba(30, 30, 30, 0.6);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.day-header {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.schedule-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.schedule-table thead th {
  background: #2a2a2a;
  color: var(--text);
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 10;
  border: 1px solid var(--border);
}

.schedule-table thead th.time-col {
  min-width: 90px;
  background: #333333;
}

.schedule-table tbody tr,
.schedule-table tbody tr:nth-child(even),
.schedule-table tbody tr:hover,
.schedule-table tbody tr:focus,
.schedule-table tbody tr:focus-within {
  background: var(--card-bg);
}

.schedule-table tbody td {
  padding: 0.25rem 0.5rem;
  text-align: center;
  border: 1px solid var(--border);
  height: 28px;
  font-size: 0.85rem;
  min-height: 40px;
  vertical-align: middle;
  cursor: pointer;
  background-color: var(--card-bg);
  transition: background-color 0.12s ease;
}

.schedule-table tbody td.time-cell {
  background-color: rgba(136, 136, 136, 0.12);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  min-width: 90px;
  white-space: nowrap;
  cursor: default;
}

.schedule-table tbody td.occupied {
  background-color: var(--card-bg);
  font-weight: 600;
  color: var(--text);
}

.schedule-table tbody td.therapy-slot {
  background-color: var(--card-bg);
}

.schedule-table tbody td.therapy-slot.occupied {
  background-color: var(--card-bg);
}

.schedule-table tbody td:not(.time-cell):hover {
  background-color: rgba(200, 200, 200, 0.22) !important;
}

/* ----- Draggable events inside the master schedule ----- */
.schedule-event.draggable-event {
  cursor: grab;
}
.schedule-event.draggable-event:active,
.schedule-event.dragging {
  cursor: grabbing;
  opacity: 0.55;
}

/* ----- Cell drop states (shown only while an event is being dragged) ----- */
.schedule-table tbody td.drop-hover {
  background-color: rgba(0, 255, 133, 0.25) !important;
  outline: 2px solid rgba(0, 255, 133, 0.7);
  outline-offset: -3px;
}
.schedule-table tbody td.drop-invalid {
  background-color: rgba(255, 51, 51, 0.18) !important;
  outline: 2px solid rgba(255, 51, 51, 0.55);
  outline-offset: -3px;
}

.schedule-table tbody td:not(:hover),
.schedule-table tbody td:not(:hover).occupied,
.schedule-table tbody td:not(:hover).therapy-slot,
.schedule-table tbody td:not(:hover).therapy-slot.occupied {
  background-color: var(--card-bg);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .schedule-table {
    font-size: 0.8rem;
  }
  
  .schedule-table thead th,
  .schedule-table tbody td {
    padding: 0.4rem 0.3rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .day-schedule {
    padding: 1rem;
  }
  
  .day-header {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .master-schedule-container {
    gap: 2rem;
  }
}

/* Login Box Styles */
.login-box {
  background: rgba(30, 30, 30, 0.95);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 450px;
  margin: 2.5rem auto;
  box-shadow: 0 8px 32px var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.login-title {
  color: var(--header);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login-info {
  margin-bottom: 2rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

/* Animated Button Styles */
.animated-button-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  margin-top: 3rem;
}

.link_wrapper {
  position: relative;
  display: inline-block;
}

.link_wrapper a {
  display: block;
  width: 250px;
  height: 50px;
  line-height: 50px;
  font-weight: bold;
  text-decoration: none;
  background: #1a1a1a;
  text-align: center;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 3px solid #1a1a1a;
  transition: all 0.35s ease;
  font-size: 0.9rem;
  border-radius: 10px;
  position: relative;
  z-index: 0;
}

.link_wrapper .icon {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  position: absolute;
  transform: rotate(45deg);
  right: 0;
  top: 0;
  z-index: -1;
  transition: all 0.35s ease;
}

.link_wrapper .icon svg {
  width: 30px;
  position: absolute;
  top: calc(50% - 15px);
  left: calc(50% - 15px);
  transform: rotate(-45deg);
  fill: var(--text);
  transition: all 0.35s ease;
}

.link_wrapper a:hover {
  width: 200px;
  border: 3px solid var(--accent);
  background: transparent;
  color: var(--text);
}

.link_wrapper a:hover + .icon {
  border: 3px solid var(--accent);
  right: -25%;
}

/* Responsive adjustments for login box */
@media (max-width: 768px) {
  .login-box {
    padding: 2rem 1.5rem;
    max-width: 90%;
    margin: 2rem auto;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
  
  .link_wrapper a {
    width: 220px;
    font-size: 0.85rem;
  }
  
  .link_wrapper a:hover {
    width: 180px;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Steve Hong Mode - Glowing Button */
.glow-on-hover {
    width: 220px;
    height: 50px;
    border: none;
    outline: none;
    color: var(--text);
    background: #1a1a1a;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.glow-on-hover:before {
    content: '';
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    position: absolute;
    top: -2px;
    left:-2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
}

.glow-on-hover:active {
    color: #000
}

.glow-on-hover:active:after {
    background: transparent;
}

.glow-on-hover:hover:before {
    opacity: 1;
}

.glow-on-hover:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    left: 0;
    top: 0;
    border-radius: 10px;
}

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

/* Content Save Button - Smaller version of glow button */
.content-save-btn {
    width: 120px;
    height: 40px;
    font-size: 0.95rem;
    line-height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated Remove Button for Content Schedule */
.remove-button {
  display: block;
  background-color: #1a1a1a;
  width: 150px;
  height: 50px;
  line-height: 50px;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 20px 0 rgba(0,0,0,.3);
  transition: all 0.25s cubic-bezier(0.310, -0.105, 0.430, 1.400);
  text-decoration: none;
  position: relative;
  z-index: 0;
}

.remove-button span,
.remove-button .icon {
  display: block;
  height: 100%;
  text-align: center;
  position: absolute;
  top: 0;
}

.remove-button span {
  width: 72%;
  line-height: inherit;
  font-size: 18px;
  text-transform: uppercase;
  left: 0;
  transition: all 0.25s cubic-bezier(0.310, -0.105, 0.430, 1.400);
}

.remove-button span:after {
  content: '';
  background-color: #444444;
  width: 2px;
  height: 70%;
  position: absolute;
  top: 15%;
  right: -1px;
}

.remove-button .icon {
  width: 28%;
  right: 0;
  transition: all 0.25s cubic-bezier(0.310, -0.105, 0.430, 1.400);
}

.remove-button .icon span {
  font-size: 24px;
  vertical-align: middle;
  transition: all 0.25s cubic-bezier(0.310, -0.105, 0.430, 1.400);
  line-height: 50px;
  position: static;
}

.remove-button .icon .icon-x {
  display: inline-block;
}

.remove-button .icon .icon-x:after {
  display: none;
}

.remove-button .icon .icon-check {
  display: none;
}

.remove-button.success {
  background-color: #2a2a2a;
}

.remove-button.success span {
  left: -72%;
  opacity: 0;
}

.remove-button.success .icon {
  width: 100%;
}

.remove-button.success .icon span {
  font-size: 30px;
}

.remove-button.success .icon .icon-x {
  display: none;
}

.remove-button.success .icon .icon-check {
  display: inline-block;
}

.remove-button.success .icon .icon-check:after {
  display: none;
}

.remove-button::before {
  content: '';
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  border-radius: 10px;
}

.remove-button:hover::before {
  opacity: 1;
}

.remove-button:hover {
  opacity: 1;
}

.remove-button:hover > span:first-child {
  left: -72%;
  opacity: 0;
}

.remove-button:hover .icon {
  width: 100%;
}

.remove-button:hover .icon .icon-x {
  display: inline-block;
  font-size: 30px;
}

.remove-button:active {
  opacity: 1;
}

/* Hover Tooltip for Coaches Notes */
.hover-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.hover-container:hover {
  background: rgba(136, 136, 136, 0.1);
  border-color: var(--accent);
}

.hover-text {
  visibility: hidden;
  opacity: 0;
  background-color: #1E1E1E;
  color: var(--text);
  text-align: left;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  position: fixed;
  z-index: 9999;
  transition: opacity 0.3s ease-in-out;
  max-width: 300px;
  min-width: 200px;
  white-space: normal;
  word-wrap: break-word;
  pointer-events: none;
  box-shadow: 0 4px 12px var(--shadow);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hover-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--border) transparent transparent transparent;
}

.hover-container:hover .hover-text {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Therapy Action Dropdown */
.therapy-action-dropdown {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.therapy-action-dropdown:hover {
  background: rgba(136, 136, 136, 0.1);
  border-color: var(--accent);
}

.therapy-action-dropdown:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.therapy-action-dropdown option {
  background: var(--card-bg);
  color: var(--text);
  padding: 8px;
}

/* Therapy Request Notes */
.therapy-request-notes {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
  min-width: 180px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.therapy-request-notes::placeholder {
  color: var(--text-secondary);
}

.therapy-request-notes:hover {
  background: rgba(136, 136, 136, 0.1);
  border-color: var(--accent);
}

.therapy-request-notes:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

/* Therapy Date/Time Input */
.therapy-datetime-input {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.therapy-datetime-input:hover {
  background: rgba(136, 136, 136, 0.1);
  border-color: var(--accent);
}

.therapy-datetime-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

/* Datetime input calendar icon color */
.therapy-datetime-input::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(0.2) saturate(2) hue-rotate(10deg);
  cursor: pointer;
}

/* Content Date/Time Input */
.content-datetime-input {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.content-datetime-input:hover {
  background: rgba(136, 136, 136, 0.1);
  border-color: var(--accent);
}

.content-datetime-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.content-datetime-input::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(0.2) saturate(2) hue-rotate(10deg);
  cursor: pointer;
}

/* Week Selector for Therapy Page */
.week-selector-therapy {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.week-selector-therapy:hover {
  background: rgba(136, 136, 136, 0.1);
  border-color: var(--accent);
}

.week-selector-therapy:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.week-selector-therapy option {
  background: var(--card-bg);
  color: var(--text);
  padding: 8px;
}

/* Content Team Members - Draggable Elements */
.team-members-container {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.team-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.team-member-chip {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: grab;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.team-member-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.team-member-chip:active {
  cursor: grabbing;
}

.team-member-chip.dragging {
  opacity: 0.5;
}

/* Drop Zone for Assigned Column */
.assigned-drop-zone {
  min-height: 40px;
  position: relative;
  padding: 0.5rem;
}

.assigned-drop-zone.drag-over {
  background: rgba(136, 136, 136, 0.2);
  border: 2px dashed var(--accent);
}

.assigned-content {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Drop Zone for Content Type Column */
.content-type-drop-zone {
  min-height: 40px;
  position: relative;
  padding: 0.5rem;
}

.content-type-drop-zone.drag-over {
  background: rgba(136, 136, 136, 0.2);
  border: 2px dashed var(--accent);
}

/* Drop Zone for Bullpen Columns (Weekly Schedule) */
.bullpen-drop-zone {
  min-height: 40px;
  position: relative;
  padding: 0.5rem;
}

.bullpen-drop-zone.drag-over {
  background: rgba(136, 136, 136, 0.2);
  border: 2px dashed var(--accent);
}

.bullpen-content {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.content-type-content {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.assigned-chip {
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  color: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.assigned-chip .remove-btn {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 12px;
  line-height: 1;
  transition: all 0.2s ease;
}

.assigned-chip .remove-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}

/* Therapy Schedule Grid Drop Zones */
.therapy-grid-drop {
  transition: background 0.2s ease;
}

.therapy-grid-drop.drag-over {
  background: rgba(136, 136, 136, 0.25) !important;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.therapy-palette-chip {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.therapy-palette-chip.dragging {
  opacity: 0.5;
}

/* Master Schedule Events */
.schedule-event {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.schedule-event strong {
  display: block;
  font-size: 0.8rem;
}

.schedule-event .event-detail {
  display: block;
  opacity: 0.85;
  font-size: 0.7rem;
}

.event-bullpen {
  background: rgba(136, 136, 136, 0.2);
  border-left: 3px solid #aaaaaa;
  color: var(--text);
}

.event-therapy {
  background: rgba(176, 176, 176, 0.15);
  border-left: 3px solid #B0B0B0;
  color: var(--text);
}

.event-force {
  background: rgba(224, 224, 224, 0.12);
  border-left: 3px solid #E0E0E0;
  color: var(--text);
}

.schedule-table td.occupied:not(:hover) {
  background-color: var(--card-bg);
}

/* Fire effect for athletes with 95 < weighted_rank <= 100 */
.fire-cell {
  position: relative;
  overflow: hidden;
}

.fire-cell-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.fire-cell .schedule-event {
  position: relative;
  z-index: 1;
}

/* Lightning effect for athletes with weighted_rank > 100 */
.lightning-cell {
  position: relative;
  overflow: hidden;
}

.lightning-cell-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: #0a0a0a;
}

.lightning-cell .schedule-event {
  position: relative;
  z-index: 1;
}

.event-elite {
  background: rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Admin-blocked lane/time slot */
.blocked-cell {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 80, 80, 0.18) 0,
      rgba(255, 80, 80, 0.18) 8px,
      rgba(0, 0, 0, 0.35) 8px,
      rgba(0, 0, 0, 0.35) 16px
    ),
    rgba(80, 0, 0, 0.4) !important;
}
.event-block {
  background: rgba(255, 60, 60, 0.25);
  border: 1px dashed rgba(255, 120, 120, 0.7);
  color: #ffd6d6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.event-block strong {
  letter-spacing: 0.05em;
}

/* Status badge colors */
.status.active {
  background: rgba(0, 255, 133, 0.15);
  color: #00FF85;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.approved, .status.scheduled, .status.assigned {
  background: rgba(176, 176, 176, 0.15);
  color: #c0c0c0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.pending {
  background: rgba(176, 176, 176, 0.1);
  color: #B0B0B0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.unassigned {
  background: rgba(255, 165, 0, 0.15);
  color: #FFA500;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.rejected, .status.cancelled, .status.inactive {
  background: rgba(160, 160, 160, 0.1);
  color: #999999;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.completed {
  background: rgba(200, 200, 200, 0.15);
  color: #d0d0d0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
