html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh; 
  overflow: auto; 
  font-family: 'Ninja Naruto', Arial, sans-serif;
  background: url(../img/ninja_warbg.jpg) no-repeat center center fixed;
  background-size: cover;
  color: white;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 80px 20px 40px;
}

/* All p tags - Times New Roman, 18px */
p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 18px;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: -250px;
  width: 220px;
  height: 100vh;
  background-color: rgba(26, 26, 26, 0.95);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
  padding-top: 60px;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar.active {
  left: 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin: 10px 0;
}

.sidebar a {
  display: block;
  padding: 12px 20px;
  color: #ff9900;
  text-decoration: none;
  font-weight: bold;
}

.sidebar a:hover {
  background-color: #333;
  padding-left: 30px;
  color: #ffb84d;
}

/* Hamburger */
.hamburger {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 30px;
  background: rgba(26, 26, 26, 0.8);
  border: 2px solid #ff9900;
  color: #ff9900;
  padding: 10px 12px;
  border-radius: 6px;
  z-index: 1001;
  cursor: pointer;
}

.hamburger:hover {
  background-color: rgba(255, 153, 0, 0.2);
  color: #ffb84d;
}


/* Loading Screen Styles - Fixed and Fully Responsive */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
  padding: clamp(10px, 3vw, 20px);
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-container {
  text-align: center;
  color: #ff9900;
  width: 100%;
  max-width: 400px;
}

/* Responsive Shuriken Design */
.shuriken-container {
  position: relative;
  width: clamp(80px, 20vw, 150px);
  height: clamp(80px, 20vw, 150px);
  margin: 0 auto clamp(20px, 5vh, 30px);
}

.shuriken-image {
  width: 100%;
  height: 100%;
  animation: shurikenSpin 1.5s linear infinite;
  filter: drop-shadow(0 0 clamp(15px, 4vw, 25px) rgba(255, 153, 0, 0.9))
          drop-shadow(0 0 clamp(30px, 8vw, 50px) rgba(255, 153, 0, 0.7));
}

/* Loading Dots - Fully Responsive */
.loading-dots {
  font-size: clamp(1.5em, 6vw, 3.5em);
  letter-spacing: clamp(0.1em, 1vw, 0.2em);
}

.loading-dots span {
  animation: dotPulse 1.8s ease-in-out infinite;
  color: #ffb84d;
  text-shadow: 0 0 clamp(8px, 2vw, 12px) rgba(255, 184, 77, 0.8);
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.4s; }
.loading-dots span:nth-child(3) { animation-delay: 0.8s; }

/* Enhanced Animations */
@keyframes shurikenSpin {
  from { 
    transform: rotate(0deg);
    filter: drop-shadow(0 0 clamp(15px, 4vw, 25px) rgba(255, 153, 0, 0.9))
            drop-shadow(0 0 clamp(30px, 8vw, 50px) rgba(255, 153, 0, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 clamp(20px, 5vw, 35px) rgba(255, 153, 0, 1))
            drop-shadow(0 0 clamp(40px, 10vw, 70px) rgba(255, 153, 0, 0.9));
  }
  to { 
    transform: rotate(360deg);
    filter: drop-shadow(0 0 clamp(15px, 4vw, 25px) rgba(255, 153, 0, 0.9))
            drop-shadow(0 0 clamp(30px, 8vw, 50px) rgba(255, 153, 0, 0.7));
  }
}

@keyframes dotPulse {
  0%, 80%, 100% { 
    opacity: 0.4;
    transform: scale(1);
  }
  40% { 
    opacity: 1;
    transform: scale(1.2);
  }
}


/* Enhanced Overview Section Design */
.overview-section {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(102, 51, 0, 0.8) 100%);
  border: 2px solid #ff9900;
  border-radius: 15px;
  padding: 60px 40px;
  margin: 40px auto 80px;
  max-width: 1000px;
  position: relative;
  box-shadow: 0 10px 30px rgba(255, 153, 0, 0.3);
  text-align: center;
}

.overview-section::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff9900, #ffb84d, #ff9900);
  border-radius: 17px;
  z-index: -1;
  opacity: 0.7;
}

.overview-section h1 {
  font-size: 3.5rem;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(255, 153, 0, 0.8);
  margin-bottom: 30px;
  position: relative;
}

.overview-section h1::after {
  content: "⚔️";
  display: block;
  font-size: 2rem;
  margin-top: 10px;
  color: #ff9900;
}

.dramatic-quote {
  background-color: rgba(0, 0, 0, 0.6);
  border-left: 5px solid #ff9900;
  border-right: 5px solid #ff9900;
  padding: 30px;
  margin: 40px 0;
  border-radius: 10px;
  position: relative;
}
.dramatic-quote p {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.8;
  color: #ffb84d;
  text-align: center;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.overview-section > p {
  font-size: 1.2rem;
  color: #f0f0f0;
  text-align: center;
  margin: 30px 0 0;
  line-height: 1.7;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* War Sections - Each War Separated */
.war-section {
  margin: 80px 0;
  padding: 40px 0;
  border-top: 3px solid #ff9900;
  position: relative;
}

.war-section:first-of-type {
  margin-top: 40px;
}

/* War Headers */
.war-header {
  text-align: center;
  margin-bottom: 40px;
}

.war-header h2 {
  color: #ff9900;
  font-size: 2.5rem;
  margin: 0 0 10px 0;
  border: none;
  padding: 0;
}

.war-period {
  display: inline-block;
  background-color: rgba(255, 153, 0, 0.2);
  color: #ffb84d;
  padding: 8px 20px;
  border-radius: 25px;
  font-style: italic;
  font-size: 1.1rem;
}

/* War Content */
.war-content {
  max-width: 1200px;
  margin: 0 auto;
}

.war-characters {
  margin: 40px 0;
}

.war-characters h3 {
  color: #ff9900;
  border-left: 4px solid #ff9900;
  padding-left: 15px;
  margin-bottom: 20px;
}

/* War Overview Sections */
.war-overview {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(51, 25, 0, 0.8) 100%);
  border: 2px solid #ff9900;
  border-radius: 12px;
  padding: 40px;
  margin: 40px 0;
  position: relative;
  box-shadow: 0 8px 25px rgba(255, 153, 0, 0.2);
}

.war-overview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9900, #ffb84d, #ff9900);
  border-radius: 12px 12px 0 0;
}

.war-overview h3 {
  color: #ff9900;
  font-size: 2rem;
  text-align: center;
  margin: 0 0 30px 0;
  border: none;
  padding: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  position: relative;
}

.war-overview h3::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff9900, transparent);
  margin: 15px auto;
}

.war-overview p {
  color: #f0f0f0;
  line-height: 1.8;
  margin: 25px 0;
  text-align: justify;
  font-size: 18px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.war-overview p:first-of-type {
  font-size: 20px;
  color: #ffb84d;
  font-weight: 600;
  text-align: center;
  font-style: italic;
}

/* War battles and impact sections */
.war-battles,
.war-impact {
  margin: 40px 0;
}

.war-battles h3,
.war-impact h3 {
  color: #ff9900;
  border-left: 4px solid #ff9900;
  padding-left: 15px;
  margin-bottom: 20px;
}

/* War Details */
.war-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.detail-item {
  background-color: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 153, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
}

.detail-item h4 {
  color: #ffb84d;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
}

.detail-item p {
  margin: 0;
  line-height: 1.5;
}

/* Character Grid */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.character-card {
  background-color: rgba(26, 26, 26, 0.9);
  border: 2px solid #ff9900;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
}

.character-card:hover {
  transform: translateY(-5px);
}

.character-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 2px solid #ff9900;
}

.character-card h4 {
  color: #ff9900;
  margin: 10px 0 5px;
  font-size: 1rem;
}

.character-card p {
  color: #ccc;
  margin: 0;
  font-size: 0.9rem;
}

/* Battle Items */
.battle-item {
  background-color: rgba(26, 26, 26, 0.8);
  border-left: 4px solid #ff9900;
  padding: 20px;
  margin: 20px 0;
  border-radius: 5px;
}

.battle-item h4 {
  color: #ffb84d;
  margin: 0 0 10px 0;
}

.battle-item p {
  margin: 0;
  line-height: 1.6;
}

/* War Impact */
.war-impact {
  background-color: rgba(26, 26, 26, 0.9);
  border: 2px solid #ff9900;
  border-radius: 10px;
  padding: 25px;
}

/* Legacy Section */
.legacy-section {
  margin: 80px 0 40px;
  padding: 40px;
  background-color: rgba(26, 26, 26, 0.9);
  border: 2px solid #ff9900;
  border-radius: 15px;
  text-align: center;
}

.legacy-section h2 {
  color: #ff9900;
  margin: 0 0 20px 0;
}

.legacy-content p {
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.6;
  font-size: 1.1rem;
}

.legacy-quote {
  border-top: 1px solid rgba(255, 153, 0, 0.3);
  padding-top: 25px;
  margin-top: 30px;
}

.legacy-quote p {
  font-style: italic;
  color: #ffb84d;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.legacy-quote cite {
  color: #ff9900;
  font-weight: bold;
}

/* Footer */
.footer {
  background-color: rgba(26, 26, 26, 0.95);
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  color: white;
  margin-top: auto;
  border-top: 1px solid rgba(255, 153, 0, 0.3);
}

.footer .social-icons {
  margin-top: 10px;
}

.footer .social-icons a {
  margin: 0 12px;
  color: #ff9900;
  text-decoration: none;
  font-size: 20px;
  padding: 8px;
  border-radius: 4px;
  background-color: rgba(255, 153, 0, 0.1);
  display: inline-block;
}

.footer .social-icons a:hover {
  color: #ffb84d;
  background-color: rgba(255, 153, 0, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .war-section {
    margin: 50px 0;
    padding: 30px 0;
  }
  
  .war-header h2 {
    font-size: 2rem;
  }
  
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .war-details {
    grid-template-columns: 1fr;
  }
  
  .legacy-section {
    padding: 25px;
  }

  /* Mobile Responsive for Overview */
  .overview-section {
    padding: 40px 20px;
    margin: 20px 10px 60px;
  }
  
  .overview-section h1 {
    font-size: 2.5rem;
  }
  
  .dramatic-quote p {
    font-size: 1.2rem;
  }
  
  .dramatic-quote {
    padding: 20px;
    margin: 30px 0;
  }
  
  .dramatic-quote::before,
  .dramatic-quote::after {
    font-size: 3rem;
  }
  
  .war-overview {
    padding: 25px;
  }
  
  .war-overview h3 {
    font-size: 1.6rem;
  }
}