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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

/* Passcode and Guest Selection Screens */
.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h1 {
  margin-bottom: 0.5rem;
  color: #2563eb;
}

.card p {
  color: #666;
  margin-bottom: 1.5rem;
}

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

#passcode-form input {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

#passcode-form button {
  padding: 0.75rem;
  font-size: 1rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#passcode-form button:hover {
  background: #1d4ed8;
}

.error {
  color: #dc2626;
  margin-top: 1rem;
}

/* Guest Selection */
.guest-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guest-btn {
  padding: 1rem;
  font-size: 1.1rem;
  background: #f0f9ff;
  border: 2px solid #2563eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.guest-btn:hover {
  background: #2563eb;
  color: white;
}

/* Main Screen Header */
header {
  background: #2563eb;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header h1 {
  font-size: 1.25rem;
}

.user-info {
  font-size: 0.9rem;
}

.link-btn {
  background: none;
  border: none;
  color: #bfdbfe;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.9rem;
}

.link-btn:hover {
  color: white;
}

/* Destination Navigation */
.destination-nav {
  background: white;
  border-bottom: 1px solid #ddd;
}

.destination-dropdown {
  display: none;
  width: 100%;
  padding: 1rem;
  padding-right: 4rem;
  font-size: 1.1rem;
  border: none;
  border-bottom: 2px solid #2563eb;
  background: white;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%232563eb'/%3E%3Cpath d='M16 20L10 14h12l-6 6z' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 32px 32px;
}

.destination-dropdown:focus {
  outline: none;
  background-color: #f0f9ff;
}

/* Destination Tabs */
.tabs {
  display: flex;
  overflow-x: auto;
  background: white;
}

.tab {
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  color: #666;
}

.tab:hover {
  background: #f5f5f5;
}

.tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

/* Mobile: show dropdown, hide tabs */
@media (max-width: 600px) {
  .destination-dropdown {
    display: block;
  }
  .tabs {
    display: none;
  }
}

/* Excursions Container */
#excursions-container {
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Excursion Card */
.excursion-card {
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.excursion-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

.excursion-price {
  font-weight: 600;
  color: #059669;
  white-space: nowrap;
}

.excursion-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.excursion-notes {
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.excursion-link {
  margin-bottom: 1rem;
}

.excursion-link a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
}

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

.added-by {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.owner-actions {
  margin-left: 0.5rem;
}

.owner-actions button {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
}

.owner-actions button:hover {
  color: #1d4ed8;
}

.owner-actions button.delete-btn {
  color: #dc2626;
}

/* Votes Section */
.votes-section {
  background: #f9fafb;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.votes-section h4 {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.vote-item {
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.vote-item .guest-name {
  font-weight: 500;
}

.vote-item .vote-note {
  color: #666;
  font-style: italic;
}

.not-interested-label {
  color: #9ca3af;
}

.edit-note-link {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  margin-left: 0.5rem;
}

.edit-note-link:hover {
  color: #1d4ed8;
}

.add-note-row {
  margin-bottom: 0.75rem;
}

.no-votes {
  color: #9ca3af;
  font-size: 0.85rem;
  font-style: italic;
}

/* Vote Buttons */
.vote-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.vote-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid;
}

.vote-btn.interested {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.vote-btn.interested:hover,
.vote-btn.interested.active {
  background: #22c55e;
  color: white;
}

.vote-btn.not-interested {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.vote-btn.not-interested:hover,
.vote-btn.not-interested.active {
  background: #ef4444;
  color: white;
}

.add-note-btn {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.85rem;
}

.add-note-btn:hover {
  text-decoration: underline;
}

.your-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Add Excursion Section */
#add-excursion-section {
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.add-btn {
  width: 100%;
  padding: 1rem;
  background: white;
  border: 2px dashed #ddd;
  border-radius: 8px;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
}

.add-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

/* Modal */
.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;
  padding: 1rem;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-bottom: 1rem;
}

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

.modal-content label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #666;
}

.modal-content input,
.modal-content textarea {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

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

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

.modal-buttons button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.modal-buttons button[type="button"] {
  background: #f5f5f5;
  border: 1px solid #ddd;
}

.modal-buttons button[type="submit"] {
  background: #2563eb;
  border: none;
  color: white;
}

/* Responsive */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .excursion-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}
