:root {
  --bg: #0a0e1a;
  --bg-secondary: #0f1218;
  --card: #161d2e;
  --card-border: #1e2840;
  --text: #e6edf3;
  --text-muted: #8b96a8;
  --accent: #4da3ff;
  --accent-hover: #6bb5ff;
  --highlight: #ffd166;
  --success: #06d6a0;
  --danger: #ef476f;
  --warning: #f78c6b;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #4da3ff 0%, #2d7dd2 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Hero Header */
.hero {
  background: var(--gradient-primary), url('../assets/imgs/plan3big.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: fadeInDown 0.6s ease-out;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 1);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Main */
main {
  max-width: 1100px;
  margin: -40px auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--card-border);
}

.section-header .icon {
  font-size: 2rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Intro Text */
.intro-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.intro-text strong {
  color: var(--accent);
  font-weight: 600;
}

/* Phase Cards */
.phase-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.phase-card:last-child {
  margin-bottom: 0;
}

.phase-card.final {
  background: rgba(77, 163, 255, 0.08);
  border-color: rgba(77, 163, 255, 0.2);
}

.phase-card h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.phase-card ul {
  list-style: none;
  padding: 0;
}

.phase-card li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text-muted);
}

.phase-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.phase-1 {
  background: linear-gradient(135deg, #06d6a0, #1b9aaa);
  color: white;
}

.badge.phase-2 {
  background: linear-gradient(135deg, #ef476f, #d64161);
  color: white;
}

.badge.phase-3 {
  background: linear-gradient(135deg, #ffd166, #f4a261);
  color: #1a1a1a;
}

.badge.phase-4 {
  background: linear-gradient(135deg, #4da3ff, #2d7dd2);
  color: white;
}

/* Combat Grid */
.combat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.combat-card {
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.1), rgba(45, 125, 210, 0.05));
  border: 2px solid rgba(77, 163, 255, 0.2);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.combat-card:hover {
  transform: scale(1.03);
  border-color: rgba(77, 163, 255, 0.4);
}

.combat-card.attack {
  border-color: rgba(239, 71, 111, 0.3);
  background: linear-gradient(135deg, rgba(239, 71, 111, 0.1), rgba(214, 65, 97, 0.05));
}

.combat-card.attack:hover {
  border-color: rgba(239, 71, 111, 0.5);
}

.combat-card h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text);
}

.combat-card p {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.combat-card small {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Info Box */
.info-box {
  background: rgba(6, 214, 160, 0.1);
  border-left: 4px solid var(--success);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.info-box h4 {
  margin-bottom: 8px;
  color: var(--success);
  font-size: 1.1rem;
}

.info-box p {
  color: var(--text-muted);
  margin: 0;
}

/* Table */
.trade-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
}

.trade-table thead {
  background: var(--gradient-accent);
}

.trade-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.trade-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--card-border);
  transition: background 0.2s;
}

.trade-table tbody tr:hover {
  background: rgba(77, 163, 255, 0.08);
}

.trade-table tbody tr.special {
  background: rgba(255, 209, 102, 0.1);
  font-weight: 600;
}

.trade-table tbody tr.special:hover {
  background: rgba(255, 209, 102, 0.15);
}

.trade-table td {
  padding: 14px 16px;
  color: var(--text-muted);
}

.trade-table td:first-child {
  font-weight: 600;
  color: var(--accent);
}

/* Special Grid */
.special-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.special-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.special-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.special-card.general {
  border-top: 3px solid var(--highlight);
}

.special-card.bunker {
  border-top: 3px solid var(--success);
}

.special-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.special-card h4 {
  font-size: 1rem;
  margin: 20px 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.special-card p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.special-card ul {
  list-style: none;
  padding: 0;
}

.special-card li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--text-muted);
}

.special-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Naval Grid */
.naval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.naval-card {
  background: rgba(77, 163, 255, 0.05);
  border: 1px solid rgba(77, 163, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.naval-card:hover {
  background: rgba(77, 163, 255, 0.1);
  border-color: rgba(77, 163, 255, 0.3);
  transform: translateY(-2px);
}

.naval-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text);
}

.naval-card ul {
  list-style: none;
  padding: 0;
}

.naval-card li {
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Objectives List */
.objectives-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.objective-item {
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.objective-item:hover {
  background: rgba(77, 163, 255, 0.08);
  border-left-width: 6px;
  transform: translateX(4px);
}

.objective-item strong {
  color: var(--text);
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.shortcut-item:hover {
  background: rgba(77, 163, 255, 0.08);
  border-color: rgba(77, 163, 255, 0.3);
}

kbd {
  background: linear-gradient(135deg, #2a3f5f, #1e2d47);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 40px;
  text-align: center;
}

.shortcut-item span {
  color: var(--text-muted);
  flex: 1;
}

/* Utilities */
.highlight {
  color: var(--highlight);
  font-weight: 600;
}

.stat-positive {
  color: var(--success);
  font-weight: 700;
  font-size: 1.1em;
}

.note {
  background: rgba(77, 163, 255, 0.08);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 8px;
  color: var(--text-muted);
}

.note strong {
  color: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
}

footer p {
  margin: 8px 0;
}

footer .version {
  font-size: 0.9rem;
  opacity: 0.7;
}

footer strong {
  color: var(--text);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 60px 20px 40px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .logo {
    width: 140px;
  }
  
  main {
    margin-top: -30px;
  }
  
  .card {
    padding: 24px;
  }
  
  .section-header h2 {
    font-size: 1.4rem;
  }
  
  .combat-grid,
  .special-grid,
  .naval-grid,
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
}
