:root {
  --primary-color: #4F46E5;
  /* Indigo 600 */
  --primary-dark: #4338CA;
  --secondary-color: #EC4899;
  /* Pink 500 */
  --bg-color: #F3F4F6;
  --surface-color: rgba(255, 255, 255, 0.85);
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --border-radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  background-image:
    radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 1rem;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.header img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.header h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards */
.card {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
  animation: slideUp 0.5s ease-out;
}

/* Typography */
h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  color: var(--text-main);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

/* Inputs */
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.8);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: white;
}

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

/* Buttons */
button {
  width: 100%;
  height: auto;
  line-height: normal;
  white-space: normal;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

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

button.secondary-btn {
  background: white;
  color: var(--text-main);
  border: 1px solid #E5E7EB;
  box-shadow: var(--shadow-sm);
}

button.secondary-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

/* Utility */
.hidden {
  display: none !important;
}

.check-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.check-item strong {
  color: var(--text-muted);
  font-weight: 500;
}

.checkmark {
  color: #10B981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.checkmark::before {
  content: "✓";
  font-weight: 800;
}

/* Specific Components */
#map {
  width: 100%;
  height: 250px;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#equipment-list div {
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #E5E7EB;
}

.media-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.tab-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.media-btn {
  flex-direction: column;
  padding: 1.5rem;
  background: white;
  color: var(--primary-color);
  border: 2px dashed #E5E7EB;
  box-shadow: none;
}

.media-btn:hover {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.02);
  transform: none;
}

.media-btn img {
  height: 28px;
  width: 28px;
  margin-bottom: 0.5rem;
  /* Reset filter for colored icons if we had them, or set current color */
  filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(231deg) brightness(96%) contrast(92%);
}

#photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

#media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.result-list {
  margin-top: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
}

.result-item {
  padding: 0.5rem 0.75rem;
  background: white;
  color: var(--text-main);
  cursor: pointer;
  border-bottom: 1px solid #E5E7EB;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item:hover {
  background: #F3F4F6;
}

.toggle-row,
.remember-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-card {
  background: white;
  color: var(--text-main);
  padding: 1.5rem;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.modal-card textarea {
  min-height: 120px;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.progress-container {
  width: 80%;
  max-width: 300px;
  height: 6px;
  background: #E5E7EB;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  width: 0%;
  transition: width 0.3s ease;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Mobile Tweaks */
@media (max-width: 768px) {
  body {
    padding: 0.75rem;
  }

  .container {
    max-width: 100%;
  }

  .card {
    padding: 1.5rem;
  }
}