:root {
  --primary: #1a5f2a;
  --primary-light: #2d8f44;
  --secondary: #8b4513;
  --accent: #ffd700;
  --danger: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
  --dark: #1a1a2e;
  --darker: #16162a;
  --card-bg: #252540;
  --text: #ffffff;
  --text-muted: #a0a0b0;
  --border: #3a3a5a;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 20px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

.status-dot.disconnected {
  background: var(--danger);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 25px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title .icon {
  font-size: 1.5rem;
}

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(40, 167, 69, 0.2);
  color: var(--success);
}

.badge-danger {
  background: rgba(220, 53, 69, 0.2);
  color: var(--danger);
}

.badge-warning {
  background: rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

/* Hotels & Restaurants Grid */
.availability-grid {
  display: grid;
  gap: 15px;
}

.availability-item {
  background: var(--darker);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid var(--border);
}

.availability-item.available {
  border-color: var(--success);
  box-shadow: 0 0 15px rgba(40, 167, 69, 0.2);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.item-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.item-location {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .item-name {
    font-size: 0.95rem;
  }

  .item-location {
    font-size: 0.75rem;
  }

  .item-header {
    flex-wrap: wrap;
    gap: 8px;
  }
}

.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .dates-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .dates-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 5px;
  }
}

.date-cell {
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .date-cell {
    padding: 6px 4px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .date-cell {
    padding: 5px 3px;
    font-size: 0.65rem;
  }
}

.date-cell.available {
  background: rgba(40, 167, 69, 0.3);
  border: 1px solid var(--success);
}

.date-cell.unavailable {
  background: rgba(220, 53, 69, 0.1);
  color: var(--text-muted);
}

/* Clickable available dates */
a.date-cell {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
}

a.date-cell.available:hover {
  background: rgba(40, 167, 69, 0.5);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}

a.date-cell.available::after {
  content: '→';
  font-size: 0.7rem;
  display: block;
  margin-top: 2px;
  opacity: 0.7;
}

.date-label {
  font-weight: 600;
  display: block;
}

.date-status {
  font-size: 0.7rem;
  margin-top: 2px;
}

/* Restaurant slots */
.slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.slot {
  padding: 6px 12px;
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid var(--success);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--success);
}

@media (max-width: 768px) {
  .slots-list {
    gap: 6px;
  }

  .slot {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

.no-slots {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* Attractions */
.attractions-section {
  grid-column: 1 / -1;
}

.attractions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

.attractions-grid::-webkit-scrollbar {
  width: 8px;
}

.attractions-grid::-webkit-scrollbar-track {
  background: var(--darker);
  border-radius: 4px;
}

.attractions-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.attraction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: var(--darker);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.attraction-item:hover {
  border-color: var(--primary-light);
}

.attraction-item.closed {
  opacity: 0.6;
}

.attraction-item.highlight {
  animation: highlight 1s ease;
}

@keyframes highlight {
  0%, 100% { background: var(--darker); }
  50% { background: rgba(255, 215, 0, 0.2); }
}

.attraction-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.attraction-empire {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.waiting-time {
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

.waiting-time.short {
  color: var(--success);
}

.waiting-time.medium {
  color: var(--warning);
}

.waiting-time.long {
  color: var(--danger);
}

.state-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.2);
  color: var(--danger);
}

.state-badge.open {
  background: rgba(40, 167, 69, 0.2);
  color: var(--success);
}

/* Activity Feed */
.activity-feed {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.activity-icon.hotel {
  background: rgba(26, 95, 42, 0.3);
}

.activity-icon.restaurant {
  background: rgba(139, 69, 19, 0.3);
}

.activity-icon.attraction {
  background: rgba(255, 215, 0, 0.3);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  font-size: 0.9rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Opening Hours */
.opening-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  text-align: center;
}

.opening-item {
  padding: 15px;
  background: var(--darker);
  border-radius: 10px;
}

.opening-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.opening-value {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Book Now Button */
.book-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.3s ease;
  margin-top: 10px;
}

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

/* Target date highlight */
.target-date {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1)) !important;
  border: 2px solid var(--accent) !important;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification Button */
.notify-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.notify-btn:hover {
  background: var(--primary-light);
  transform: scale(1.05);
}

.notify-btn.enabled {
  background: var(--success);
}

.notify-btn.disabled {
  background: var(--border);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Activity icon for system */
.activity-icon.system {
  background: rgba(100, 100, 150, 0.3);
}

/* Activity details */
.activity-details {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* New activity animation */
.activity-item.new {
  animation: slideIn 0.3s ease, glow 2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow {
  0%, 100% {
    background: transparent;
  }
  50% {
    background: rgba(255, 215, 0, 0.15);
  }
}

/* Activity type colors */
.activity-item.hotel .activity-title {
  color: var(--success);
}

.activity-item.restaurant .activity-title {
  color: #f0a500;
}

.activity-item.attraction .activity-title {
  color: var(--accent);
}

/* Highlight for important activities */
.activity-item.important {
  background: rgba(255, 215, 0, 0.1);
  border-left: 3px solid var(--accent);
}

/* SMS Alerts Button */
.sms-btn {
  background: linear-gradient(135deg, var(--accent), #f0a500);
  color: var(--dark);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none;
}

.sms-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 30px;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

footer .heart {
  color: #e74c3c;
  animation: heartbeat 1.5s ease-in-out infinite;
  display: inline-block;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.1); }
  20%, 40% { transform: scale(1); }
}
