/* public/style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 80px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 0;
}

header > div {
  flex: 1;
}

h1 {
  font-size: 24px;
  color: #ffffff;
}

.user-info {
  font-size: 14px;
  color: #999;
  margin-top: 4px;
}

.btn-link {
  background: none;
  border: none;
  color: #4CAF50;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: 14px;
}

.btn-link:active {
  color: #45a049;
}

.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: #4CAF50;
  color: white;
  width: 100%;
  margin-top: 12px;
}

.btn-primary:active {
  background: #45a049;
  transform: scale(0.98);
}

.btn-secondary {
  background: #2d2d2d;
  color: #e0e0e0;
  border: 1px solid #404040;
}

.btn-secondary:active {
  background: #3a3a3a;
}

.trip-card {
  background: #242424;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 1px solid #333;
}

.trip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.trip-date-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trip-date {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.points-badge {
  display: inline-block;
  background: #2d2d2d;
  color: #4CAF50;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #404040;
}

.points-badge.warning {
  background: #ff9800;
  color: #1a1a1a;
  border-color: #ff9800;
}

.trip-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}

.btn-icon:active {
  background: #3a3a3a;
}

.point-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #2d2d2d;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid #404040;
}

.point-item:active {
  background: #3a3a3a;
}

.point-info {
  flex: 1;
}

.point-name {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.point-address {
  font-size: 14px;
  color: #999;
}

.point-icon {
  font-size: 24px;
  margin-right: 12px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #242424;
  border: 1px solid #404040;
  border-radius: 12px;
  padding: 24px;
  margin: 16px;
  width: calc(100% - 32px);
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 800px;
}

.modal h2 {
  margin-bottom: 20px;
  color: #ffffff;
}

form label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #e0e0e0;
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #404040;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: #1a1a1a;
  color: #e0e0e0;
}

input[type="password"] {
  padding: 16px;
  font-size: 18px;
  letter-spacing: 0.5px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

textarea {
  min-height: 400px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 16px;
}

.point-input {
  background: #2d2d2d;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #404040;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.point-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.point-input-actions {
  display: flex;
  gap: 4px;
}

.point-input input {
  margin-bottom: 0;
}

.point-input button {
  background: #d32f2f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.point-input button:active {
  background: #b71c1c;
}

.btn-move {
  background: #2d2d2d !important;
  border: 1px solid #404040;
  padding: 4px 8px !important;
  font-size: 16px !important;
}

.btn-move:active {
  background: #3a3a3a !important;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
}

#btnAddTrip {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 568px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.empty-state {
  text-align: center;
  color: #666;
  padding: 40px 0;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: #2d2d2d;
  color: #999;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: #4CAF50;
  border-bottom-color: #4CAF50;
  background: #1a1a1a;
}

#authTabs {
  display: flex;
  margin: -24px -24px 20px -24px;
  border-bottom: 1px solid #404040;
}

.auth-form {
  margin-top: 20px;
}

.error-message {
  color: #f44336;
  margin-top: 12px;
  font-size: 14px;
  min-height: 20px;
}

@media (max-width: 600px) {
  .container {
    padding: 12px;
  }
  
  h1 {
    font-size: 20px;
  }
  
  header .btn-secondary {
    padding: 8px 16px;
    font-size: 14px;
  }
}