html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh; 
  overflow: auto; 
  font-family: 'Ninja Naruto', Arial, sans-serif;
  background: url(../img/clans_bg.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;
}

/* Search Bar */
.search-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 40px;
}

.search-box {
  position: relative;
  width: 300px;
  max-width: 100%;
}

.search-box input {
  width: 100%;
  padding: 10px 50px 15px 20px;
  font-size: 1.1em;
  background: rgba(26, 26, 26, 0.9);
  border: 2px solid rgba(255, 153, 0, 0.3);
  border-radius: 20px;
  color: white;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: #ff9900;
  box-shadow: 0 0 15px rgba(255, 153, 0, 0.3);
}

.search-box input::placeholder {
  color: #999;
  font-style: italic;
}

.search-icon {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  color: #ff9900;
  font-size: 1.2em;
  pointer-events: none;
}

/* Clans Section */
.clans-container {
  max-width: 1400px;
  margin: 0 auto;
}

.page-title {
  text-align: center;
  font-size: 3em;
  color: #ff9900;
  margin-bottom: 50px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: bold;
  letter-spacing: 2px;
}

.clans {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Clan Sections - Half Screen Width */
.clan-section {
  display: flex;
  width: 100%;
  min-height: 400px;
  background-color: rgba(26, 26, 26, 0.9);
  border: 2px solid #333;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.clan-section:nth-child(even) {
  flex-direction: row-reverse;
}

.clan-section:hover {
  border-color: #ff9900;
  box-shadow: 0 12px 35px rgba(255, 153, 0, 0.3);
}

.clan-image {
  flex: 1;
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.clan-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clan-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 30px;
  text-align: center;
}

.clan-name {
  font-size: 2.2em;
  color: #ff9900;
  margin: 0 0 10px 0;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.clan-ability {
  font-size: 1.2em;
  color: #ffb84d;
  margin: 0;
  font-weight: bold;
  font-style: italic;
}

.clan-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: rgba(26, 26, 26, 0.95);
}

.clan-header h4 {
  font-size: 1.8em;
  color: #ff9900;
  margin: 0 0 20px 0;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.clan-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.stat {
  background: rgba(255, 153, 0, 0.2);
  color: #ffb84d;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: bold;
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.clan-story {
  flex: 1;
}

.clan-story p {
  font-size: 1em;
  font-family: Arial, sans-serif;
  color: #e0e0e0;
  margin: 0 0 20px 0;
  line-height: 1.7;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  text-align: justify;
}

.clan-story p strong {
  color: #ffb84d;
  font-weight: bold;
}

/* 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: 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: 120px;
  height: 120px;
  margin: 0 auto 30px;
}

.shuriken-image {
  width: 100%;
  height: 100%;
  animation: shurikenSpin 1.5s linear infinite;
  filter: drop-shadow(0 0 25px rgba(255, 153, 0, 0.9))
          drop-shadow(0 0 50px rgba(255, 153, 0, 0.7));
}

/* Loading Dots - Fully Responsive */
.loading-dots {
  font-size: 3.5em;
  letter-spacing: 0.2em;
}

.loading-dots span {
  animation: dotPulse 1.8s ease-in-out infinite;
  color: #ffb84d;
  text-shadow: 0 0 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 25px rgba(255, 153, 0, 0.9))
            drop-shadow(0 0 50px rgba(255, 153, 0, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 35px rgba(255, 153, 0, 1))
            drop-shadow(0 0 70px rgba(255, 153, 0, 0.9));
  }
  to { 
    transform: rotate(360deg);
    filter: drop-shadow(0 0 25px rgba(255, 153, 0, 0.9))
            drop-shadow(0 0 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);
  }
}

/* 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);
}

/* Custom Scrollbar */
.content-half::-webkit-scrollbar {
  width: 8px;
}

.content-half::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.content-half::-webkit-scrollbar-thumb {
  background: rgba(255, 153, 0, 0.5);
  border-radius: 4px;
}

.content-half::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 153, 0, 0.7);
}

/* RESPONSIVE DESIGN - Mobile Adjustments Only */
@media (max-width: 1024px) {
  .clan-section {
    flex-direction: column !important;
    min-height: auto;
  }
  
  .clan-section:nth-child(even) {
    flex-direction: column !important;
  }
  
  .clan-image {
    min-height: 300px;
  }
  
  .clan-content {
    padding: 30px;
  }
  
  .search-container {
    justify-content: center;
  }
  
  .search-box {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 70px 15px 20px;
  }
  
  .page-title {
    font-size: 2.5em;
    margin-bottom: 30px;
  }
  
  .clans {
    gap: 30px;
  }
  
  .clan-image {
    min-height: 250px;
  }
  
  .clan-content {
    padding: 25px;
  }
  
  .clan-name {
    font-size: 1.8em;
  }
  
  .clan-header h4 {
    font-size: 1.5em;
  }
  
  .clan-story p {
    font-size: 0.95em;
  }
  
  .search-container {
    margin-bottom: 30px;
  }
  
  .search-box input {
    font-size: 1em;
    padding: 12px 45px 12px 18px;
  }
  
  .sidebar {
    width: 250px;
  }
  
  .loading-dots {
    font-size: 2.5em;
  }
  
  .shuriken-container {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2em;
    letter-spacing: 1px;
  }
  
  .clan-image {
    min-height: 200px;
  }
  
  .clan-content {
    padding: 20px;
  }
  
  .clan-name {
    font-size: 1.6em;
  }
  
  .clan-header h4 {
    font-size: 1.3em;
  }
  
  .stat {
    font-size: 0.8em;
    padding: 6px 12px;
  }
  
  .clan-story p {
    font-size: 0.9em;
  }
  
  .search-box {
    width: 100%;
  }
  
  .search-box input {
    font-size: 0.9em;
    padding: 10px 40px 10px 15px;
  }
  
  .search-icon {
    font-size: 1em;
  }
  
  .hamburger {
    font-size: 24px;
    padding: 8px 10px;
  }
  
  .sidebar {
    width: 200px;
  }
  
  .loading-dots {
    font-size: 2em;
  }
  
  .shuriken-container {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 320px) {
  .page-title {
    font-size: 1.8em;
  }
  
  .clan-name {
    font-size: 1.4em;
  }
  
  .clan-header h4 {
    font-size: 1.2em;
  }
  
  .clan-content {
    padding: 15px;
  }
  
  .clan-overlay {
    padding: 20px;
  }
  
  .hamburger {
    font-size: 20px;
    padding: 6px 8px;
  }
  
  .sidebar {
    width: 180px;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
  .main-content {
    padding: 60px 15px 20px;
  }
  
  .page-title {
    font-size: 2.2em;
    margin-bottom: 25px;
  }
  
  .clan-image {
    min-height: 250px;
  }
  
  .clan-content {
    padding: 20px;
  }
}