/* Fishn Buddy - Dark Nautical Theme */

:root {
  --navy-bg: #0a1628;
  --ocean-blue: #1e88e5;
  --seafoam-green: #4db6ac;
  --white-text: #ffffff;
  --gray-text: #b0b3b8;
  --card-bg: #1a2332;
  --border-color: #2d3748;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --green: #22c55e;
  --blue-gold: #3b82f6;
}

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

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

/* Typography */
h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--gray-text); }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.hero {
  background: linear-gradient(135deg, var(--navy-bg) 0%, var(--ocean-blue) 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--navy-bg) 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  background: linear-gradient(45deg, var(--white-text), var(--seafoam-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--gray-text);
  margin-bottom: 2rem;
}

/* Search */
.search-section {
  margin: 2rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--white-text);
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--ocean-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.search-input::placeholder {
  color: var(--gray-text);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-suggestion {
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.search-suggestion:hover {
  background: var(--navy-bg);
}

.search-suggestion:last-child {
  border-bottom: none;
}

.location-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--seafoam-green);
  color: var(--navy-bg);
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.location-button:hover {
  background: #26a69a;
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 136, 229, 0.15);
}

/* Featured Locations Grid */
.featured-locations {
  padding: 3rem 0;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.location-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(30, 136, 229, 0.2);
}

.location-thumbnail {
  height: 120px;
  background: linear-gradient(135deg, var(--ocean-blue), var(--seafoam-green));
  position: relative;
  overflow: hidden;
}

.location-thumbnail::before {
  content: '🌊';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0.7;
}

.location-info {
  padding: 1.5rem;
}

.location-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.location-state {
  color: var(--gray-text);
  font-size: 0.9rem;
}

/* State Links */
.state-links {
  padding: 2rem 0;
  text-align: center;
}

.state-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.state-tag {
  padding: 8px 16px;
  background: var(--ocean-blue);
  color: var(--white-text);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.state-tag:hover {
  background: #1976d2;
  transform: translateY(-1px);
}

/* Location Page Styles */
.location-header {
  background: linear-gradient(135deg, var(--navy-bg) 0%, var(--ocean-blue) 100%);
  padding: 2rem 0;
  text-align: center;
  position: relative;
}

.fishing-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: bold;
  margin: 1rem 0;
  position: relative;
}

.score-1, .score-2, .score-3 { background: var(--red); }
.score-4, .score-5 { background: var(--orange); }
.score-6, .score-7 { background: var(--yellow); color: var(--navy-bg); }
.score-8, .score-9 { background: var(--green); }
.score-10 { background: linear-gradient(45deg, var(--blue-gold), var(--seafoam-green)); }

.current-time {
  color: var(--gray-text);
  margin-top: 0.5rem;
}

/* Sections */
.sections {
  padding: 2rem 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Tide Chart */
.tide-chart {
  grid-column: 1 / -1;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}

.tide-curve {
  stroke: var(--ocean-blue);
  stroke-width: 3;
  fill: none;
}

.current-time-marker {
  stroke: var(--seafoam-green);
  stroke-width: 2;
}

.tide-point {
  fill: var(--seafoam-green);
}

.tide-label {
  fill: var(--white-text);
  font-size: 12px;
  text-anchor: middle;
}

/* Conditions Widget */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.condition-item {
  text-align: center;
  padding: 1rem;
  background: rgba(30, 136, 229, 0.1);
  border-radius: 12px;
}

.condition-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.condition-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.condition-label {
  font-size: 0.85rem;
  color: var(--gray-text);
}

/* Sun & Moon */
.sun-moon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.moon-phase {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.moon-visual {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gray-text);
  position: relative;
  overflow: hidden;
}

.moon-shadow {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--navy-bg);
  border-radius: 0 50px 50px 0;
}

/* Solunar Timeline */
.solunar-timeline {
  height: 60px;
  background: var(--card-bg);
  border-radius: 8px;
  position: relative;
  margin: 1rem 0;
}

.solunar-period {
  position: absolute;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.major-period {
  background: rgba(77, 182, 172, 0.8);
}

.minor-period {
  background: rgba(77, 182, 172, 0.4);
}

/* Forecast Cards */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.forecast-card {
  text-align: center;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.forecast-date {
  font-size: 0.9rem;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
}

.forecast-score {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin: 0.5rem 0;
}

/* Nearby Locations */
.nearby-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.nearby-link {
  padding: 8px 16px;
  background: var(--ocean-blue);
  color: var(--white-text);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nearby-link:hover {
  background: #1976d2;
  transform: translateY(-1px);
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--gray-text);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--ocean-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  color: var(--red);
  text-align: center;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px solid var(--red);
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}

.attribution {
  color: var(--gray-text);
  font-size: 0.9rem;
}

.attribution a {
  color: var(--ocean-blue);
  text-decoration: none;
}

.attribution a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container { padding: 0 15px; }
  .hero { padding: 3rem 0 2rem; }
  .section-grid { grid-template-columns: 1fr; }
  .sun-moon-grid { grid-template-columns: 1fr; }
  .forecast-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Location type badge */
.location-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.location-type-badge.coastal {
  background: rgba(30, 136, 229, 0.2);
  color: var(--ocean-blue);
  border: 1px solid rgba(30, 136, 229, 0.3);
}
.location-type-badge.inland {
  background: rgba(77, 182, 172, 0.2);
  color: var(--seafoam-green);
  border: 1px solid rgba(77, 182, 172, 0.3);
}

@media (max-width: 480px) {
  .locations-grid { grid-template-columns: 1fr; }
  .state-tags { justify-content: center; }
  .nearby-links { justify-content: center; }
}