/* Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  letter-spacing: 0.2px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

a:focus, .btn:focus {
  outline: 2px dashed #007bff;
  outline-offset: 4px;
}

h1, h2 {
  margin: 0 0 15px;
  font-weight: 700;
  line-height: 1.3;
}

/* Header */
header {
  background: #fff;
  padding: 20px 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: #007bff;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 0.5px;
}

.logo img {
  height: 40px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-left: 0;
  margin: 0;
}

nav a {
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 6px;
}

nav a i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

nav a:hover {
  color: #007bff;
  background: rgba(0, 123, 255, 0.1);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  margin-top: 100px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea 0%, #12528d 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.hero h1 {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  max-width: 600px;
  margin: 0 auto 30px;
  opacity: 0.95;
}

.hero .btn-group {
  position: relative;
  z-index: 2;
}

.btn {
  display: inline-block;
  padding: 16px 28px;
  background: linear-gradient(45deg, #ffffff, #f8f9fa);
  color: #667eea;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: linear-gradient(45deg, #f8f9fa, #ffffff);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  color: #764ba2;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
}

@media (max-width: 576px) {
  .btn-group {
    flex-direction: column;
    align-items: center;
  }
  .btn-spice {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

/* Services Section */
.services {
  padding: 60px 20px;
  background: #fff;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
}

.services h2 {
  margin-bottom: 20px;
  font-size: 32px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: #f9f9f9;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-8px);
}

.card i {
  font-size: 32px;
  color: #007bff;
  margin-bottom: 15px;
}

/* Server Table */
.live-status h1 {
  text-align: center;
  padding-top: 50px;
}

.status-table {
  width: 90%;
  margin: 30px auto 60px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  animation: fadeIn 1s ease-in-out;
}

.status-table th, .status-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.status-table th {
  background-color: #007BFF;
  color: white;
}

.status-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Rules Section */
#rules {
  background-color: #fffbea;
  border-top: 2px solid #ffce00;
  border-bottom: 2px solid #ffce00;
  padding: 40px 20px;
}

#rules ul {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

#rules li {
  margin: 15px 0;
  font-size: 16px;
  display: flex;
  align-items: start;
  gap: 12px;
  line-height: 1.5;
}

#rules li i {
  color: #f39c12;
  font-size: 18px;
  min-width: 20px;
}

/* Gallery */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  min-height: 40vh;
  background: #f9f9f9;
}

.gallery img {
  width: 400px;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery img:hover {
  transform: scale(1.05);
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 20px;
  animation: zoomIn 0.3s ease;
}

/* Firmware Page Specific Styles */
.main-header {
  background: linear-gradient(to right, #004e92, #000428);
  color: #fff;
  padding: 25px 10px;
  text-align: center;
  animation: fadeInDown 1s ease-in-out;
  margin-top: 100px;
}

.container {
  max-width: 1400px;
  margin: 30px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.container h2 {
  text-align: center;
  font-size: 26px;
  color: #005ea3;
  margin-bottom: 20px;
}

.main-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, #00c6ff, #007bff, #00ffea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 3s infinite ease-in-out;
  word-break: break-word;
}

.main-header p {
  font-size: 18px;
  color: #cfe9ff;
  margin-top: 10px;
}



form {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

input[type="text"] {
  padding: 12px;
  width: 230px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

input[type="text"]:focus {
  outline: none;
  border-color: #007bff;
}

button[type="submit"] {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: bold;
  background: linear-gradient(to right, #007bff, #00c6ff);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover {
  background: linear-gradient(to right, #005ea3, #00b0ff);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.firmware-card {
  background: #f0faff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.firmware-card.loaded {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.firmware-card:hover {
  transform: translateY(-5px);
}

.firmware-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  margin-bottom: 10px;
}

.info {
  font-size: 14px;
  margin: 4px 0;
  font-weight: 500;
  color: #00426d;
  word-break: break-word;
}

.btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.firmware-btn {
  background: linear-gradient(to right, #00aaff, #00ccee);
  color: #fff;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease;
  word-break: break-word;
}

.firmware-btn:hover {
  background: linear-gradient(to right, #0088cc, #00b0dd);
}

.no-data {
  text-align: center;
  color: #cc0000;
  font-size: 16px;
  margin-top: 20px;
}

.copy-success {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  display: none;
  z-index: 999;
  font-size: 14px;
}



/* Footer Styles */
#footer {
  background: #001a33;
  color: #fff;
  padding: 40px 20px 30px;
  text-align: center;
  margin-top: 60px;
  border-top: 3px solid #007bff;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  width: 100%;
}

#footer p {
  font-size: 14px;
  color: #ccc;
  margin: 6px 0;
  max-width: 800px;
  line-height: 1.5;
}

#footer p strong {
  color: #f8d43a;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.footer-nav::-webkit-scrollbar {
  display: none;
}

.footer-nav a {
  color: #58a6ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 5px 10px;
  white-space: nowrap;
  display: inline-block;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.footer-nav a::before {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: #58a6ff;
  transition: width 0.3s ease;
  box-shadow: 0 0 6px #58a6ff;
}

.footer-nav a:hover::before {
  width: 100%;
}

.footer-nav a:hover {
  color: #ffffff;
  text-shadow: 0 0 6px #58a6ff;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .footer-nav {
    justify-content: center;
    gap: 12px;
  }

  #footer p {
    font-size: 13px;
    padding: 0 10px;
  }
}






/* Animations */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 20px;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
  }

  nav ul.active {
    display: flex;
  }

  .main-header h1 {
    font-size: 2rem;
  }

  form {
    flex-direction: column;
    align-items: center;
  }

  input[type="text"] {
    min-width: 250px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btns {
    flex-direction: column;
  }
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  input[type="text"], button[type="submit"] {
    width: 100%;
  }
}
