:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #f1f5f9;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #22c55e;
  --danger: #ef4444;
  --background: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: var(--secondary);
  line-height: 1.6;
}

#app {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.primary-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: var(--secondary);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.secondary-btn:hover {
  background: var(--border);
}

.danger-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.danger-btn:hover {
  opacity: 0.9;
}

.card {
  background: var(--background);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px var(--shadow);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 6px var(--shadow);
}

.event-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.event-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.event-card-content {
  padding: 1.5rem;
}

.event-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.event-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.event-description {
  color: var(--text-light);
  margin-top: 0.5rem;
}

.attendee-count {
  background: var(--secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.event-detail {
  padding: 2rem;
}

.event-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.attendee-list {
  margin-top: 1.5rem;
}

.attendee-item {
  padding: 0.75rem;
  background: var(--secondary);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.attendee-name {
  font-weight: 600;
}

.attendee-badge {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--background);
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 25px var(--shadow);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input,
textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.share-box {
  background: var(--secondary);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.share-link {
  flex: 1;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
}

.copy-btn {
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:active {
  transform: scale(0.95);
}

.back-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.back-btn:hover {
  text-decoration: underline;
}

.capacity-warning {
  background: #fef3c7;
  color: #92400e;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.capacity-full {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.5rem;
  }

  .primary-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .event-actions {
    flex-direction: column;
  }

  .event-actions button {
    width: 100%;
  }
}
