:root {
  --primary-color: #ff7f00; /* Vibrant Orange from logo */
  --secondary-color: #ffa500; /* Lighter Orange / Yellowish from logo */
  --background-dark: #1c1c1c; /* Very dark grey, almost black */
  --background_light: #282828; /* Slightly lighter dark grey */
  --text-color: #e0e0e0; /* Light grey for body text */
  --heading-color: #ffffff; /* Pure White for headings */
  --border-color: #555555; /* Medium dark grey for borders */
  --shadow-color: rgba(0, 0, 0, 0.6); /* More pronounced shadow for dark theme */
  --transition-speed: 0.3s;
}

/* General Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-dark);
  scroll-behavior: smooth; /* Smooth scroll */
  overflow-x: hidden; /* Prevent horizontal scroll on animations */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

/* Header */
.header {
  background-color: var(--background-light);
  padding: 1rem 0; /* Slightly less padding */
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: transform var(--transition-speed) ease;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex; /* To center the image if needed */
  align-items: center;
  height: 60px; /* Fixed height for the logo area */
}

.logo-img {
  height: 100%;
  width: auto;
  max-width: 250px;
  border-radius: 50%; /* Pravi logo kružnim */
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
}

.nav ul {
  list-style: none;
  display: flex;
}

.nav ul li {
  margin-left: 40px;
}

.nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  transition: color var(--transition-speed) ease;
}

.nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-speed) ease-out;
}

.nav ul li a:hover {
  color: var(--primary-color);
}

.nav ul li a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--text-color);
  position: relative;
  transition: background-color var(--transition-speed) ease;
}

.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--text-color);
  position: absolute;
  transition: transform var(--transition-speed) ease, top var(--transition-speed) ease;
}

.hamburger::before {
  top: -10px;
}

.hamburger::after {
  top: 10px;
}

.menu-toggle.active .hamburger {
  background-color: transparent;
}

.menu-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Auto-hide navbar */
.header.hidden {
  transform: translateY(-100%);
}

/* Hero Section */
.hero {
  position: relative;
  text-align: center;
  padding: 180px 0 120px;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin-top: -80px; /* Compensate for fixed header */
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
    url("/placeholder.svg?height=1080&width=1920") no-repeat center center / cover;
  background-blend-mode: overlay;
  filter: brightness(0.8);
  z-index: -1;
  animation: backgroundPan 20s infinite alternate ease-in-out;
}

@keyframes backgroundPan {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

.hero h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 5.5rem;
  margin-bottom: 25px;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color);
  font-weight: 300;
}

.highlight {
  color: var(--primary-color);
}

.ip-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background-color: var(--background-light);
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 2px solid var(--border-color);
  position: relative;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.ip-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.server-ip {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  user-select: all;
  letter-spacing: 1px;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background-color var(--transition-speed) ease, transform 0.2s ease, box-shadow var(--transition-speed)
    ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn.primary {
  background-color: var(--primary-color);
  color: var(--heading-color);
}

.btn.primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.copy-feedback {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: var(--heading-color);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, bottom 0.3s ease;
  white-space: nowrap;
}

.copy-feedback.show {
  opacity: 1;
  visibility: visible;
  bottom: -45px;
}

/* Sections */
section {
  padding: 100px 0;
  text-align: center;
  background-color: var(--background-dark);
}

section:nth-of-type(even) {
  background-color: var(--background-light);
}

section h3 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 4.2rem;
  margin-bottom: 60px;
  color: var(--heading-color);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

/* Features Section */
.features .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.feature-item {
  background-color: var(--background-light);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px var(--shadow-color);
  border: 2px solid var(--border-color);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
}

.feature-item .icon {
  width: 72px;
  height: 72px;
  margin-bottom: 25px;
  color: var(--primary-color);
  transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.feature-item:hover .icon {
  transform: scale(1.1);
  color: var(--secondary-color);
}

.feature-item h4 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  margin-bottom: 18px;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.feature-item p {
  font-size: 1.05rem;
  color: var(--text-color);
  font-weight: 300;
}

/* About Section */
.about p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--text-color);
  font-weight: 300;
}

/* Rules Section */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.rule-item {
  background-color: var(--background-light);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 6px 20px var(--shadow-color);
  border: 2px solid var(--border-color);
  text-align: left;
}

.rule-item h4 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.rule-item p {
  font-size: 1rem;
  color: var(--text-color);
}

.rules p:last-of-type {
  margin-top: 40px;
  font-size: 1.1rem;
  color: var(--text-color);
}

/* Staff Section */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.staff-member {
  background-color: var(--background-light);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 6px 20px var(--shadow-color);
  border: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.staff-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 127, 0, 0.6); /* Orange glow */
}

.staff-member h4 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.7rem;
  color: var(--heading-color);
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.staff-member p {
  font-size: 0.95rem;
  color: var(--text-color);
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.gallery-item {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 25px var(--shadow-color);
  border: 2px solid var(--border-color);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
}

/* FAQ Section */
.faq-items {
  max-width: 900px;
  margin: 50px auto 0;
  text-align: left;
}

.faq-item {
  background-color: var(--background-light);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 6px 20px var(--shadow-color);
  border: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.faq-item h4 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.faq-item p {
  font-size: 1rem;
  color: var(--text-color);
}

/* Contact Section */
.contact {
  background-color: var(--background-light);
}

.contact p {
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
  color: var(--text-color);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--background-dark);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px var(--shadow-color);
  border: 2px solid var(--border-color);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--heading-color);
  font-size: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--background-light);
  color: var(--text-color);
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

#submit-btn {
  width: 100%;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-feedback {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  display: none;
}

.form-feedback.success {
  background-color: rgba(34, 197, 94, 0.1);
  border: 2px solid #22c55e;
  color: #22c55e;
  display: block;
}

.form-feedback.error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 2px solid #ef4444;
  color: #ef4444;
  display: block;
}

/* Connect Section */
.connect .ip-container {
  margin-bottom: 40px;
}

.social-links {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 35px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: var(--background-light);
  border-radius: 50%;
  border: 2px solid var(--border-color);
  transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease, border-color
    var(--transition-speed) ease;
  text-decoration: none;
}

.social-icon i {
  font-size: 28px;
  color: var(--primary-color);
  transition: color var(--transition-speed) ease;
}

.social-icon:hover {
  transform: translateY(-5px) scale(1.05);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.social-icon:hover i {
  color: var(--heading-color);
}

/* Footer */
.footer {
  background-color: var(--background-light);
  color: var(--text-color);
  padding: 2.5rem 0;
  text-align: center;
  border-top: 2px solid var(--border-color);
  font-size: 0.95rem;
  font-weight: 300;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-speed) ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: var(--heading-color);
  transition: transform var(--transition-speed) ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}
.delay-4 {
  animation-delay: 0.8s;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero h2 {
    font-size: 4.5rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  section h3 {
    font-size: 3.5rem;
  }
  .feature-item,
  .rule-item,
  .staff-member,
  .faq-item {
    padding: 30px;
  }
  .feature-item h4 {
    font-size: 1.8rem;
  }
  .about p {
    font-size: 1.1rem;
  }
  .server-ip {
    font-size: 1.8rem;
  }
  .gallery-item {
    height: 200px;
  }
  .logo-link {
    height: 50px; /* Adjust logo size for smaller screens */
  }
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
  .header .container {
    flex-direction: row;
    justify-content: space-between;
  }

  .nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .nav ul li {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  .nav ul li a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.4rem;
    padding: 20px 40px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
  }

  .nav ul li:last-child a {
    border-bottom: none;
  }

  .nav ul li a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 127, 0, 0.1);
    transform: translateX(10px);
  }

  .nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
  }

  .nav ul li a:hover::after {
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 150px 0 100px;
    min-height: 80vh;
  }

  .hero h2 {
    font-size: 3.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .ip-container {
    flex-direction: column;
    gap: 15px;
    padding: 18px 25px;
  }

  .server-ip {
    font-size: 1.6rem;
  }

  .btn {
    padding: 12px 25px;
    font-size: 1rem;
  }

  section {
    padding: 80px 0;
  }

  section h3 {
    font-size: 3rem;
    margin-bottom: 40px;
  }

  .feature-grid,
  .rules-grid,
  .staff-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    height: 220px;
  }

  .about p,
  .rules p:last-of-type,
  .faq-item p {
    font-size: 1rem;
  }

  .social-links {
    gap: 25px;
  }
  .social-icon {
    width: 48px;
    height: 48px;
  }
  .logo-link {
    height: 45px; /* Further adjust logo size for mobile */
  }

  /* Contact form responsive adjustments */
  .contact-form {
    padding: 25px;
    margin: 0 15px;
  }

  .form-group input,
  .form-group textarea {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .logo-link {
    height: 40px; /* Smallest logo size for very small screens */
  }
  .hero h2 {
    font-size: 3rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .server-ip {
    font-size: 1.4rem;
  }
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  section h3 {
    font-size: 2.5rem;
  }
  .feature-item h4 {
    font-size: 1.6rem;
  }
  .gallery-item {
    height: 180px;
  }
}
