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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1b4e 50%, #1a1a1a 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: #1a1a1a;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(255, 119, 0, 0.3), 0 0 100px rgba(138, 43, 226, 0.2);
  overflow: hidden;
  border: 2px solid #ff7700;
}

header {
  background: #000;
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(255, 119, 0, 0.4);
  border-bottom: 3px solid #ff7700;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

/* Tip Banner */
.tip-banner {
  background: linear-gradient(135deg, #8a2be2 0%, #ff7700 100%);
  padding: 15px 30px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 2px solid #ff7700;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
  min-height: 60px;
}

.tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tip-text {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.tip-text.fade-out {
  opacity: 0;
}

.header-logo {
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 0 auto 0 auto;
  display: block;
}

nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: #ff7700;
  color: white;
  border-color: #ff7700;
  box-shadow: 0 0 20px rgba(255, 119, 0, 0.6);
}

.tab-content {
  display: none;
  padding: 40px;
  background: #1a1a1a;
}

.tab-content.active {
  display: block;
}

.tab-content h2 {
  color: #ff7700;
  margin-bottom: 30px;
  font-size: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tab-content h3 {
  color: #8a2be2;
  margin-bottom: 20px;
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Two Column Layout */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.entry-column, .history-column {
  min-height: 400px;
}

/* Form Styles */
.form-section {
  background: #2a2a2a;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  border: 2px solid #ff7700;
  box-shadow: 0 4px 15px rgba(255, 119, 0, 0.2);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #ff7700;
  font-size: 1.05rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #8a2be2;
  border-radius: 8px;
  font-size: 1rem;
  transition: border 0.3s;
  background: #1a1a1a;
  color: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #ff7700;
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.5);
}

.form-group select:disabled {
  background: #333;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary, .btn-secondary {
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  margin-top: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #ff7700 0%, #8a2be2 100%);
  box-shadow: 0 4px 15px rgba(255, 119, 0, 0.6);
  border: 2px solid #ff7700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 119, 0, 0.8);
}

.btn-secondary {
  background: linear-gradient(135deg, #8a2be2 0%, #ff7700 100%);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.6);
  border: 2px solid #8a2be2;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.8);
}

.message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  display: none;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.help-text {
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 10px;
}

/* Import Section */
.import-section {
  background: #fff3cd;
  padding: 20px;
  border-radius: 15px;
  border: 2px dashed #ffc107;
}

.import-section h3 {
  color: #856404;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.import-section input[type="file"] {
  display: block;
  margin: 15px 0;
  padding: 10px;
  border: 2px solid #ffc107;
  border-radius: 8px;
  background: white;
  width: 100%;
}

/* Personal Stats Box */
.stats-box {
  background: #2a2a2a;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  border: 2px solid #8a2be2;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

.stats-box .stat-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #444;
}

.stats-box .stat-item:last-child {
  border-bottom: none;
}

.stats-box .stat-label {
  font-weight: 600;
  color: #8a2be2;
}

.stats-box .stat-value {
  font-weight: 700;
  color: #ff7700;
  font-size: 1.2rem;
}

/* History List */
#personal-history {
  max-height: 500px;
  overflow-y: auto;
}

.history-item {
  background: #2a2a2a;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid #ff7700;
  box-shadow: 0 2px 8px rgba(255, 119, 0, 0.2);
}

.history-item .date {
  font-weight: 600;
  color: #8a2be2;
}

.history-item .steps {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ff7700;
}

/* Leaderboard */
.leaderboard-section {
  margin-bottom: 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard {
  width: 100%;
  border-collapse: collapse;
  background: #2a2a2a;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 119, 0, 0.3);
  border: 2px solid #8a2be2;
}

.leaderboard th {
  background: linear-gradient(135deg, #ff7700 0%, #8a2be2 100%);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

.leaderboard td {
  padding: 15px;
  border-bottom: 1px solid #444;
  color: #fff;
}

.leaderboard tbody tr:hover {
  background: #333;
}

.leaderboard tbody tr:nth-child(1) {
  background: linear-gradient(90deg, #ffd70020 0%, transparent 100%);
}

.leaderboard tbody tr:nth-child(1) td:first-child {
  color: #ffd700;
  font-weight: bold;
  font-size: 1.3rem;
}

.leaderboard tbody tr:nth-child(2) {
  background: linear-gradient(90deg, #c0c0c020 0%, transparent 100%);
}

.leaderboard tbody tr:nth-child(2) td:first-child {
  color: #c0c0c0;
  font-weight: bold;
  font-size: 1.2rem;
}

.leaderboard tbody tr:nth-child(3) {
  background: linear-gradient(90deg, #cd7f3220 0%, transparent 100%);
}

.leaderboard tbody tr:nth-child(3) td:first-child {
  color: #cd7f32;
  font-weight: bold;
  font-size: 1.1rem;
}

.number-large {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff7700;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: linear-gradient(135deg, #ff7700 0%, #8a2be2 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 119, 0, 0.6);
  border: 2px solid #ff7700;
}

.stat-card h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
}

/* Charts */
.chart-container {
  background: #2a2a2a;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  border: 2px solid #8a2be2;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.chart-container canvas {
  max-height: 400px;
  width: 100%;
  height: auto;
}

/* Monster Cards */
.monster-today {
  margin-bottom: 40px;
}

.monster-card-today {
  background: linear-gradient(135deg, #2a2a2a 0%, #3a1a4a 100%);
  padding: 40px;
  border-radius: 20px;
  border: 3px solid #ff7700;
  box-shadow: 0 8px 30px rgba(255, 119, 0, 0.4);
  text-align: center;
}

.monster-icon-large {
  font-size: 8rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(255, 119, 0, 0.6));
}

.monster-name {
  color: #ff7700;
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.monster-description {
  color: #bbb;
  font-size: 1.2rem;
  margin-bottom: 30px;
  font-style: italic;
}

.monster-goal {
  background: rgba(138, 43, 226, 0.3);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  border: 2px solid #8a2be2;
}

.goal-label {
  color: #8a2be2;
  font-weight: 600;
  font-size: 1.2rem;
  margin-right: 10px;
}

.goal-value {
  color: #ff7700;
  font-weight: 700;
  font-size: 1.8rem;
}

.caught-count {
  color: #ff7700;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 30px;
}

.team-progress-list {
  text-align: left;
  margin-top: 30px;
}

.team-progress-list h4 {
  color: #8a2be2;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.team-progress-item {
  background: rgba(42, 42, 42, 0.8);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 2px solid #444;
  transition: all 0.3s;
}

.team-progress-item.caught {
  border-color: #ff7700;
  background: rgba(255, 119, 0, 0.1);
}

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

.team-name {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.team-steps {
  color: #ff7700;
  font-weight: 600;
}

.progress-bar {
  background: #1a1a1a;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #444;
}

.progress-fill {
  background: linear-gradient(90deg, #ff7700 0%, #8a2be2 100%);
  height: 100%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.6);
}

/* Monster Timeline */
.monster-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.monster-card {
  background: #2a2a2a;
  border-radius: 15px;
  padding: 20px;
  border: 2px solid #444;
  transition: all 0.3s;
}

.monster-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.monster-card.today {
  border-color: #ff7700;
  box-shadow: 0 0 20px rgba(255, 119, 0, 0.4);
}

.monster-card.past {
  opacity: 0.8;
}

.monster-card.future {
  border-style: dashed;
  opacity: 0.7;
}

.monster-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.monster-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.monster-info {
  flex: 1;
}

.monster-card-name {
  color: #ff7700;
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.monster-date {
  color: #999;
  font-size: 0.9rem;
}

.monster-status {
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.monster-status.today {
  background: #ff7700;
  color: white;
}

.monster-status.past {
  background: #444;
  color: #999;
}

.monster-status.future {
  background: #8a2be2;
  color: white;
}

.monster-card-description {
  color: #bbb;
  font-size: 0.95rem;
  margin-bottom: 15px;
  font-style: italic;
}

.monster-card-goal {
  color: #ff7700;
  font-weight: 600;
  margin-bottom: 15px;
}

.monster-catches {
  background: rgba(255, 119, 0, 0.1);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ff7700;
  margin-top: 15px;
}

.monster-catches strong {
  color: #ff7700;
  display: block;
  margin-bottom: 10px;
}

.monster-catches ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.monster-catches li {
  color: #fff;
  padding: 5px 0;
  border-bottom: 1px solid #444;
}

.monster-catches li:last-child {
  border-bottom: none;
}

/* Caught Monsters List (Team Stats) */
.caught-monsters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid #444;
}

.monster-badge {
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 4px rgba(255, 119, 0, 0.6));
}

.monster-badge:hover {
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 1024px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .monster-timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-logo {
    max-width: 300px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .tab-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  .tab-content {
    padding: 20px;
  }

  .tip-banner {
    padding: 12px 20px;
    min-height: 50px;
  }

  .tip-text {
    font-size: 0.95rem;
  }

  .tip-icon {
    font-size: 1.2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard {
    font-size: 0.9rem;
    min-width: 600px;
  }

  .leaderboard th,
  .leaderboard td {
    padding: 10px;
    white-space: nowrap;
  }

  .chart-container {
    padding: 15px;
  }

  .chart-container canvas {
    max-height: 300px;
  }

  .chart-container h3 {
    font-size: 1.2rem;
  }
}
