/* Modern CSS Reset & Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f4f6; /* light gray */
  min-height: 100vh;
  color: #1a202c;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Card Styles */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 3px solid #3b82f6;
  padding-bottom: 0.75rem;
}

/* Form Styles */
form.card label {
  display: block;
  margin-bottom: 1.5rem;
}

form.card label span {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #2d3748;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

select {
  cursor: pointer;
  appearance: none;
  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='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Button Styles */
button {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

button:active {
  transform: translateY(0);
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

button[disabled]:hover {
  transform: none;
  background: #3b82f6;
}

button.remove-row {
  background: #ef4444;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

button.remove-row:hover {
  background: #dc2626;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

button.header-btn {
  background: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

button.header-btn:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

button.download-btn {
  background: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

button.download-btn:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#addChannel {
  margin-top: 1rem;
  background: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#addChannel:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#startMeeting {
  background: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#startMeeting:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#endMeeting {
  background: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#endMeeting:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#getSummary {
  background: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#getSummary:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

th,
td {
  padding: 1rem;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: #f7fafc;
}

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

.row-index {
  font-weight: 600;
  color: #3b82f6;
}

/* Alert Styles */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  border-left: 4px solid;
  animation: slideIn 0.3s ease;
}

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

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #f87171;
}

/* Login Page Styles */
body > .container > h1 {
  text-align: center;
  color: #3b82f6;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

body > .container > form.card {
  max-width: 400px;
  margin: 0 auto;
}

/* Empty State */
p {
  text-align: center;
  color: #718096;
  font-size: 1.1rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.mt {
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

/* Code/Pre Styles */
pre {
  white-space: pre-wrap;
  background: #1e3a8a;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  max-height: 400px;
  overflow: auto;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.6;
}

pre::-webkit-scrollbar {
  width: 8px;
}

pre::-webkit-scrollbar-track {
  background: #1e40af;
  border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

/* Details/Summary Styles */
details {
  cursor: pointer;
}

details summary {
  font-weight: 600;
  color: #3b82f6;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

details summary:hover {
  background-color: #f7fafc;
}

details[open] summary {
  margin-bottom: 1rem;
}

details h3 {
  color: #2d3748;
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.25rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .controls {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
  }
}

/* Link Styles */
a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2563eb;
  text-decoration: underline;
}
