/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #333;
}

.container {
  width: 100%;
  max-width: 800px;
}

/* Cards */
.landing-card,
.team-card,
.admin-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #667eea;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #555;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input[type="text"] {
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
}

/* Buttons */
.btn {
  padding: 15px 30px;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #48bb78;
  color: white;
}

.btn-secondary:hover {
  background: #38a169;
  transform: translateY(-2px);
}

.btn-danger {
  background: #f56565;
  color: white;
}

.btn-danger:hover {
  background: #e53e3e;
  transform: translateY(-2px);
}

.btn-large {
  font-size: 1.3rem;
  padding: 20px 40px;
}

.btn-small {
  font-size: 0.9rem;
  padding: 8px 16px;
}

.btn-link {
  background: transparent;
  color: #667eea;
  padding: 10px 20px;
  font-size: 1rem;
}

.btn-link:hover {
  background: #f7fafc;
}

/* Admin link */
.admin-link {
  text-align: center;
  margin-top: 30px;
}

.admin-link a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.95rem;
}

.admin-link a:hover {
  text-decoration: underline;
}

/* Team page - Recording section */
.recording-section {
  margin: 30px 0;
  padding: 30px;
  background: #f7fafc;
  border-radius: 12px;
  text-align: center;
}

.status-message {
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 6px;
}

.status-message.recording {
  background: #fed7d7;
  color: #c53030;
  font-weight: 600;
}

.status-message.processing {
  background: #feebc8;
  color: #c05621;
}

.status-message.error {
  background: #fed7d7;
  color: #c53030;
}

.timer {
  font-size: 3rem;
  font-weight: bold;
  color: #667eea;
  margin: 20px 0;
  font-family: 'Courier New', monospace;
}

.controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.upload-status {
  margin-top: 20px;
  padding: 10px;
  border-radius: 6px;
  font-weight: 500;
}

.upload-status.uploading {
  background: #bee3f8;
  color: #2c5282;
}

.upload-status.success {
  background: #c6f6d5;
  color: #22543d;
}

.upload-status.error {
  background: #fed7d7;
  color: #c53030;
}

/* Playback section */
.playback-section {
  margin: 30px 0;
  padding: 30px;
  background: #f7fafc;
  border-radius: 12px;
}

#playbackArea {
  margin-top: 20px;
  text-align: center;
}

.audio-player {
  width: 100%;
  max-width: 500px;
  margin: 15px auto;
  display: block;
}

.no-recording {
  color: #666;
  font-style: italic;
}

/* Admin page */
.admin-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

#recordingsContainer {
  margin: 30px 0;
}

.recordings-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recordings-table th,
.recordings-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.recordings-table th {
  background: #667eea;
  color: white;
  font-weight: 600;
}

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

.recordings-table tr:hover {
  background: #f7fafc;
}

.team-name {
  font-weight: 600;
  color: #667eea;
}

.timestamp {
  color: #666;
  font-size: 0.9rem;
}

.audio-cell audio {
  width: 100%;
  max-width: 300px;
}

.actions-cell {
  text-align: center;
}

.loading,
.no-recordings,
.error {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.1rem;
}

.error {
  color: #c53030;
}

/* Navigation */
.navigation {
  margin-top: 30px;
  text-align: center;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive design */
@media (max-width: 768px) {
  .landing-card,
  .team-card,
  .admin-card {
    padding: 25px;
  }

  h1 {
    font-size: 2rem;
  }

  .timer {
    font-size: 2.5rem;
  }

  .btn-large {
    font-size: 1.1rem;
    padding: 15px 30px;
  }

  .recordings-table {
    font-size: 0.9rem;
  }

  .recordings-table th,
  .recordings-table td {
    padding: 10px;
  }

  .audio-cell audio {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .landing-card,
  .team-card,
  .admin-card {
    padding: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .timer {
    font-size: 2rem;
  }

  .controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .recordings-table {
    font-size: 0.8rem;
  }

  .recordings-table th,
  .recordings-table td {
    padding: 8px;
  }

  /* Stack table on mobile */
  .recordings-table,
  .recordings-table thead,
  .recordings-table tbody,
  .recordings-table th,
  .recordings-table td,
  .recordings-table tr {
    display: block;
  }

  .recordings-table thead tr {
    display: none;
  }

  .recordings-table tr {
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
  }

  .recordings-table td {
    border: none;
    position: relative;
    padding-left: 50%;
  }

  .recordings-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: bold;
    color: #667eea;
  }
}
