/* index.css - Custom stylesheet with modern dark-mode aesthetics */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #030303;
  --card-bg: #0a0a0c;
  --card-bg-hover: #121215;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  /* Text colors */
  --text-primary: #f5f5f7;
  --text-secondary: #8e8e93;
  --text-muted: #48484a;
  
  /* Status Colors */
  --status-free: #10b981;
  --status-free-bg: rgba(16, 185, 129, 0.06);
  --status-free-border: rgba(16, 185, 129, 0.2);
  --status-free-glow: rgba(16, 185, 129, 0.15);
  
  --status-busy: #f59e0b;
  --status-busy-bg: rgba(245, 158, 11, 0.06);
  --status-busy-border: rgba(245, 158, 11, 0.2);
  --status-busy-glow: rgba(245, 158, 11, 0.15);
  
  --accent-color: #3b82f6;
  --danger-color: #ef4444;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header Styles */
header {
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(3, 3, 3, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 2rem;
}

.header-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  font-size: 1.1rem;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-free);
  box-shadow: 0 0 8px var(--status-free);
  animation: pulse-green 2s infinite;
}

.logo-dot.busy {
  background-color: var(--status-busy);
  box-shadow: 0 0 8px var(--status-busy);
  animation: pulse-busy 2s infinite;
}

/* Main Container */
main {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ASCII Header */
.ascii-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ascii-art {
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: pre;
  overflow-x: auto;
  user-select: none;
}

@media (min-width: 500px) {
  .ascii-art {
    font-size: 12px;
  }
}

.ascii-subtitle {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

/* Status Layout Card */
.status-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--status-free), transparent);
}

.status-card.busy::before {
  background: linear-gradient(90deg, var(--status-busy), transparent);
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--status-free-bg);
  border: 1px solid var(--status-free-border);
  color: var(--status-free);
  box-shadow: 0 0 15px var(--status-free-glow);
  text-transform: uppercase;
}

.status-badge.free, .status-card.free .status-badge {
  background-color: var(--status-free-bg);
  border: 1px solid var(--status-free-border);
  color: var(--status-free);
  box-shadow: 0 0 15px var(--status-free-glow);
}

.status-badge.busy, .status-card.busy .status-badge {
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger-color);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.status-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

.time-updated {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'Fira Code', monospace;
}

/* Status Details Grid */
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .status-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-item {
  border-left: 2px solid var(--border-color);
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.status-card.busy .grid-item {
  border-left-color: rgba(245, 158, 11, 0.2);
}

.status-card.free .grid-item {
  border-left-color: rgba(16, 185, 129, 0.2);
}

.grid-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.grid-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Disclaimer Terminal Callout */
.disclaimer-card {
  background-color: #060608;
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Fira Code', monospace;
}

.disclaimer-header {
  background-color: rgba(239, 68, 68, 0.05);
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
  padding: 0.6rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.disclaimer-title {
  color: var(--danger-color);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disclaimer-dots {
  display: flex;
  gap: 0.4rem;
}

.disclaimer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.disclaimer-dot.red { background-color: var(--danger-color); opacity: 0.6; }

.disclaimer-body {
  padding: 1.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
  position: relative;
}

.disclaimer-body::before {
  content: '>';
  color: var(--danger-color);
  margin-right: 0.6rem;
  font-weight: bold;
}

/* Calendar Admin Page Layout */
.admin-lock-screen {
  position: fixed;
  inset: 0;
  background-color: var(--bg-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lock-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lock-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lock-icon {
  font-size: 2.5rem;
  color: var(--text-secondary);
}

.lock-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.8rem;
  font-family: 'Fira Code', monospace;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-input {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
}

.btn {
  background-color: var(--text-primary);
  color: var(--bg-color);
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color-hover);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace;
  text-align: center;
}

/* Admin Dashboard grid layout */
.admin-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .admin-dashboard {
    grid-template-columns: 1.4fr 1fr;
  }
}

.admin-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.admin-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Interactive Calendar Styles */
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-month-year {
  font-weight: 600;
  font-size: 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-header-day {
  text-align: center;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-day:hover {
  background-color: var(--card-bg-hover);
  border-color: var(--border-color-hover);
}

.calendar-day.empty {
  visibility: hidden;
  pointer-events: none;
}

.calendar-day.selected {
  border-color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.calendar-day.today {
  border-color: var(--accent-color);
  background-color: rgba(59, 130, 246, 0.03);
}

.calendar-day.has-events {
  position: relative;
}

.calendar-day.has-events::after {
  content: '';
  width: 5px;
  height: 5px;
  background-color: var(--status-busy);
  border-radius: 50%;
  align-self: center;
  margin-top: auto;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Event List Styles */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.no-events {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
}

.event-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}

.event-item:hover {
  border-color: var(--border-color-hover);
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.event-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.event-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'Fira Code', monospace;
}

.event-wait {
  font-size: 0.75rem;
  color: var(--status-busy);
  font-family: 'Fira Code', monospace;
}

.event-delete-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.event-delete-btn:hover {
  color: var(--danger-color);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Modal form style */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Sync status styles */
.sync-badge {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sync-badge.synced {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--status-free);
}

.sync-badge.syncing {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--status-busy);
}

.sync-badge.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.spinner {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes pulse-green {
  0%, 100% {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), 0 0 0 0px rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.8), 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-busy {
  0%, 100% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6), 0 0 0 0px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.8), 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  border-top: 1px solid var(--border-color);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Hidden helper class */
.hidden {
  display: none !important;
}

/* Speedy Page Updates */
.main-question {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-family: 'Fira Code', monospace;
  color: var(--text-secondary);
}

@media (min-width: 600px) {
  .main-question {
    font-size: 1.8rem;
  }
}

.answer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  margin-bottom: 1rem;
}

.status-answer {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  animation: float 3.5s ease-in-out infinite;
}

@media (min-width: 600px) {
  .status-answer {
    font-size: 2.8rem;
  }
}

.status-answer.free {
  color: var(--status-free);
  text-shadow: 0 0 35px rgba(16, 185, 129, 0.4);
}

.status-answer.busy {
  color: var(--danger-color);
  text-shadow: 0 0 35px rgba(239, 68, 68, 0.4);
}

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