* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f4f4f4;
  color: #333;
  line-height: 1.6;
  animation: bodyFadeIn 0.5s ease;
}

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  animation: imageFadeIn 2s ease-out;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
  z-index: 1;
  animation: overlayFadeIn 2s ease-out;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 2;
  width: 90%;
  max-width: 900px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-subtitle {
  font-size: 1.4rem;
  opacity: 0.9;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 1s forwards;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.intro {
  text-align: center;
  margin-bottom: 3rem;
}

.intro h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #8B0000;
}

.intro p {
  font-size: 1.1rem;
  color: #555;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 2s; }
.card:nth-child(2) { animation-delay: 2.2s; }
.card:nth-child(3) { animation-delay: 2.4s; }

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #8B0000;
}

.card p {
  font-size: 0.95rem;
  color: #555;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  overflow: auto;
  padding: 10px 0;
}

.modal-content {
  background: white;
  margin: 1% auto;
  padding: 1.5rem;
  width: 98%;
  max-width: 1200px;
  max-height: 96vh;
  border-radius: 12px;
  position: relative;
  animation: modalopen 0.4s;
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 2rem;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  z-index: 1001;
  background: rgba(255,255,255,0.9);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close:hover {
  color: #000;
  background: white;
}

.operation-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #8B0000;
}

.op-title {
  font-size: 2rem;
  color: #8B0000;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.op-date {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.op-subtitle {
  font-style: italic;
  color: #777;
}

.video-container {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  max-height: 60vh;
}

.video-title {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7);
  z-index: 10;
  pointer-events: none;
  background: rgba(139, 0, 0, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  max-width: calc(100% - 2rem);
}

.plyr {
  border-radius: 8px;
  width: 100%;
  height: 100%;
  max-height: 60vh;
}

.plyr--video {
  background: #000;
}

.plyr__video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}

.plyr__video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.plyr__control--overlaid {
  background: rgba(139, 0, 0, 0.9);
  border: 2px solid #fff;
}

.plyr__control--overlaid:hover {
  background: #8B0000;
}

.plyr--full-ui input[type=range] {
  color: #8B0000;
}

.plyr__progress__buffer {
  color: rgba(139, 0, 0, 0.3);
}

.operation-content {
  margin-top: 1.5rem;
}

.full-detail {
  line-height: 1.7;
  font-size: 0.95rem;
}

.section {
  margin: 1.5rem 0;
  padding: 1.2rem;
  background: #fdfdfd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 3px solid #8B0000;
}

.section h3 {
  color: #8B0000;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.section h4 {
  margin-top: 1.2rem;
  color: #8B0000;
  font-size: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.army-list {
  columns: 2;
  column-gap: 1.5rem;
  list-style: none;
}

.army-list li {
  margin: 0.3rem 0;
  position: relative;
  padding-left: 1.2rem;
  break-inside: avoid;
}

.army-list li:before {
  content: "▌";
  position: absolute;
  left: 0;
  color: #8B0000;
  font-weight: bold;
}

.command-list {
  list-style: none;
}

.command-list li {
  margin: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.command-list li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: #8B0000;
}

.chrono-table, .losses-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
  background: white;
}

.chrono-table th, .losses-table th {
  background: #8B0000;
  color: white;
  padding: 0.8rem;
  text-align: left;
  font-weight: 600;
}

.chrono-table td, .losses-table td {
  padding: 0.7rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.chrono-table tr:hover, .losses-table tr:hover {
  background: #f9f9f9;
}

.total {
  font-weight: bold;
  background: #f0f0f0;
}

blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
  background: #f9f9f9;
  border-left: 4px solid #8B0000;
  font-style: italic;
  color: #555;
  border-radius: 0 4px 4px 0;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: #333;
  font-style: normal;
}

.map-desc {
  background: #f8f8f8;
  padding: 1rem;
  border-left: 4px solid #8B0000;
  border-radius: 0 4px 4px 0;
}

.loading {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #8B0000;
}

.error {
  text-align: center;
  padding: 2rem;
  color: #8B0000;
  background: #ffe6e6;
  border-radius: 8px;
  margin: 1rem 0;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #1a1a1a;
  color: #ccc;
  margin-top: 3rem;
  font-size: 0.9rem;
}

footer p {
  margin: 0.5rem 0;
}

@keyframes bodyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes imageFadeIn {
  from { opacity: 0; filter: brightness(0.4) blur(5px); }
  to { opacity: 1; filter: brightness(0.6) blur(0); }
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalopen {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.card:hover {
  animation: pulse 0.5s ease, fadeInUp 0.6s ease forwards;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
    animation: fadeInUp 0.8s ease 0.5s forwards;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    animation: fadeInUp 0.8s ease 1s forwards;
  }
  
  .container {
    padding: 1rem;
    animation: fadeInUp 0.8s ease 1.2s forwards;
  }
  
  .timeline {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    margin: 0.5% auto;
    padding: 1rem;
    width: 99%;
    max-height: 98vh;
  }
  
  .close {
    top: 8px;
    right: 12px;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
  
  .op-title {
    font-size: 1.5rem;
    margin-top: 0.5rem;
  }
  
  .op-date {
    font-size: 1rem;
  }
  
  .video-container {
    max-height: 50vh;
    margin: 1rem 0;
  }
  
  .plyr {
    max-height: 50vh;
  }
  
  .video-title {
    font-size: 0.8rem;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.3rem 0.7rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .army-list {
    columns: 1;
  }
  
  .section {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .chrono-table, .losses-table {
    font-size: 0.8rem;
  }
  
  .chrono-table th,
  .losses-table th,
  .chrono-table td,
  .losses-table td {
    padding: 0.5rem;
  }
  
  .card:nth-child(1) { animation-delay: 1.5s; }
  .card:nth-child(2) { animation-delay: 1.7s; }
  .card:nth-child(3) { animation-delay: 1.9s; }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .modal-content {
    padding: 0.8rem;
    border-radius: 8px;
  }
  
  .plyr__controls {
    padding: 5px;
  }
  
  .plyr__control {
    margin: 0 2px;
    padding: 6px;
  }
  
  .plyr__menu__container {
    bottom: 100%;
    margin-bottom: 10px;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card h3 {
    font-size: 1.2rem;
  }
  
  footer {
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }
}

@media (min-height: 1000px) {
  .video-container {
    max-height: 70vh;
  }
  
  .plyr {
    max-height: 70vh;
  }
}

.modal-content .chrono-table,
.modal-content .losses-table {
  font-size: 0.85rem;
}

.modal-content .chrono-table th,
.modal-content .losses-table th {
  font-size: 0.9rem;
}