@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --main-font: 'Inter', sans-serif;
  --main-color: #39BEFF;
  --background-color: #24272B;
  --white-color: #FFFFFF;
  --black-color: #000000;
  --description-color: #D2D0D0;
  --green-color: #4AFF6B;
  --ip-copied-background: rgba(74, 255, 107, 0.17);
  --ip-copied-icon-background: rgba(74, 255, 107, 0.5);
  --copy-ip-button-background: rgba(57, 190, 255, 0.7);
  --how-to-join-button-background: rgba(210, 208, 208, 0.2);
  --stats-background: rgba(210, 208, 208, 0.05);
  --stat-icon-background-2: rgba(57, 190, 255, 0.5);
  --scroll-bar: rgba(210, 208, 208, 0.3);
  --scroll-bar-hover: #555555FF;
  --red-color: #FF7C7C;
  --warning-background: rgba(255, 124, 124, 0.17);
  --warning-icon-background: rgba(255, 124, 124, 0.5);
  --warning-color: #F5C1C1;
  --default-rank-color: rgba(210, 208, 208, 0.3);
}

/* Body */
body {
  background: var(--background-color);
  font-family: var(--main-font);
  color: var(--description-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Links & Buttons */
a, .navbar .links .link {
  color: var(--description-color);
  text-decoration: none;
  transition: 0.3s ease;
}

a:hover, .navbar .links .link:hover {
  color: var(--white-color);
}

button, .btn {
  background: var(--main-color);
  color: var(--white-color);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  font-family: var(--main-font);
}

button:hover, .btn:hover {
  background: rgba(57, 190, 255, 0.8);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--stats-background);
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-bar);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-bar-hover);
}


.navbar .links {
  display: flex;
  gap: 30px;
  transition: 0.3s ease-in-out;
}

.navbar .links .link {
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* Add a navbar action area for buttons/CTA */
.navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.navbar .nav-actions .btn-primary {
  background: var(--main-color);
  color: var(--white-color);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--main-color);
  white-space: nowrap;
}

.navbar .nav-actions .btn-primary:hover {
  background: rgba(57, 190, 255, 0.9);
  box-shadow: 0 6px 20px rgba(57, 190, 255, 0.3);
  transform: translateY(-2px);
}

.navbar .nav-actions .btn-secondary {
  background: transparent;
  color: var(--description-color);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(210, 208, 208, 0.3);
  white-space: nowrap;
}

.navbar .nav-actions .btn-secondary:hover {
  background: var(--how-to-join-button-background);
  border-color: var(--main-color);
  color: var(--white-color);
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.navbar .mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  gap: 4px;
  background: transparent;
  border: none;
  margin-left: auto;
}

.navbar .mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white-color);
  transition: 0.3s ease;
  border-radius: 2px;
}

.navbar .mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar .mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar .mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.navbar .mobile-toggle:hover span {
  background: var(--main-color);
}

.navbar .links .link:hover:before {
  left: 0;
}

.navbar .links .link.active {
  color: var(--white-color);
  background: rgba(57, 190, 255, 0.15);
  box-shadow: 0 4px 15px rgba(57, 190, 255, 0.15);
}

.navbar .links .link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  border-radius: 5px;
  background: var(--main-color);
}

/* Header */
#header {
  background: url("../../images/header-background.jpg") no-repeat center fixed;
  background-size: cover;
  min-height: 30vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 150px 10%;
  z-index: 0;
  position: relative;
}

#header .content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  max-width: 100%;
}

#header .content .info .minecraft-server-ip {
  color: var(--white-color);
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 600;
}

#header .content .info .title {
  color: var(--white-color);
  font-size: 65px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  word-break: break-word;
}

#header .content .info .title span {
  color: var(--main-color);
}

#header .content .description {
  color: var(--description-color);
  font-size: 18px;
  max-width: 700px;
  line-height: 1.6;
}

/* Footer */
#footer {
  background: var(--stats-background);
  padding: 80px 10%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

#footer p {
  color: var(--description-color);
}

#footer p span {
  color: var(--white-color);
}

/* Sections */
section:not(#header) .content {
  padding: 80px 10%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Contact Form Improvements */
#contacts .content .columns {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 40px;
}

#contacts .content .columns .contact-form {
  display: flex;
  flex-direction: column;
  gap: 35px;
  flex: 2;
  min-width: 100%;
  background: rgba(57, 190, 255, 0.05);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(57, 190, 255, 0.1);
}

#contacts .content .columns .contact-form .row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
}

#contacts .content .columns .contact-form .row label {
  color: var(--white-color);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
}

.row input {
  background: var(--stats-background);
  border: 1px solid rgba(210, 208, 208, 0.3);
  padding: 18px 24px;
  font-size: 16px;
  color: var(--white-color);
  outline: none;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  width: 100%;
  font-family: var(--main-font);
}

.row input:focus, .row input:hover {
  background: var(--how-to-join-button-background);
  border-color: var(--main-color);
  box-shadow: 0 0 12px rgba(57, 190, 255, 0.4);
  transform: translateY(-1px);
}

.row textarea {
  background: var(--stats-background);
  padding: 18px 24px;
  font-size: 16px;
  outline: none;
  line-height: 1.6;
  border-radius: 8px;
  color: var(--white-color);
  font-family: var(--main-font);
  border: 1px solid rgba(210, 208, 208, 0.3);
  transition: all 0.3s ease-in-out;
  resize: vertical;
  min-height: 220px;
  max-height: 400px;
  width: 100%;
}

.row textarea:focus, .row textarea:hover {
  background: var(--how-to-join-button-background);
  border-color: var(--main-color);
  box-shadow: 0 0 12px rgba(57, 190, 255, 0.4);
  transform: translateY(-1px);
}

/* Custom Select Dropdown Styling */
.row select {
  background: var(--stats-background);
  border: 1px solid rgba(210, 208, 208, 0.3);
  padding: 18px 24px;
  font-size: 16px;
  color: var(--white-color);
  outline: none;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  width: 100%;
  font-family: var(--main-font);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2339BEFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 20px;
  padding-right: 60px;
}

.row select:focus, .row select:hover {
  background-color: var(--how-to-join-button-background);
  border-color: var(--main-color);
  box-shadow: 0 0 12px rgba(57, 190, 255, 0.4);
  transform: translateY(-1px);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.row select option {
  background: var(--background-color);
  color: var(--white-color);
  padding: 12px 16px;
  border: none;
  font-family: var(--main-font);
}

.row select option:hover,
.row select option:checked {
  background: var(--main-color);
  color: var(--white-color);
}

/* Custom Checkbox Styling */
.row input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(210, 208, 208, 0.3);
  border-radius: 4px;
  background: var(--stats-background);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease-in-out;
  padding: 0;
  margin-right: 12px;
  flex-shrink: 0;
}

.row input[type="checkbox"]:checked {
  background: var(--main-color);
  border-color: var(--main-color);
  box-shadow: 0 0 8px rgba(57, 190, 255, 0.4);
}

.row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white-color);
  font-size: 14px;
  font-weight: bold;
}

.row input[type="checkbox"]:hover {
  border-color: var(--main-color);
  box-shadow: 0 0 8px rgba(57, 190, 255, 0.2);
}

/* Radio Button Styling */
.row input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(210, 208, 208, 0.3);
  border-radius: 50%;
  background: var(--stats-background);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease-in-out;
  padding: 0;
  margin-right: 12px;
  flex-shrink: 0;
}

.row input[type="radio"]:checked {
  border-color: var(--main-color);
  box-shadow: 0 0 8px rgba(57, 190, 255, 0.4);
}

.row input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--main-color);
}

.row input[type="radio"]:hover {
  border-color: var(--main-color);
  box-shadow: 0 0 8px rgba(57, 190, 255, 0.2);
}

/* Checkbox and Radio Label Layouts */
.row.checkbox, .row.radio {
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.row.checkbox label, .row.radio label {
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}

#contacts .content .columns .contact-form .form-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 25px;
  border-top: 1px solid rgba(210, 208, 208, 0.1);
}

#contacts .content .columns .contact-form .form-footer button {
  background: var(--main-color);
  border: 2px solid var(--main-color);
  border-radius: 8px;
  padding: 16px 40px;
  color: var(--white-color);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  min-width: fit-content;
  box-shadow: 0 4px 15px rgba(57, 190, 255, 0.2);
}

#contacts .content .columns .contact-form .form-footer button:hover {
  background: rgba(57, 190, 255, 0.85);
  box-shadow: 0 8px 25px rgba(57, 190, 255, 0.4);
  transform: translateY(-2px);
}

#contacts .content .columns .contact-form .form-footer button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(57, 190, 255, 0.3);
}

#contacts .content .columns .contact-form .form-footer .alert {
  color: var(--green-color);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  flex: 1;
  min-width: 200px;
  padding: 12px 20px;
  background: rgba(74, 255, 107, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(74, 255, 107, 0.2);
}

/* Responsive Design */

/* Large tablets and small desktops */
@media screen and (max-width: 1200px) {
  .navbar {
    padding: 20px 5%;
  }
  
  section:not(#header) .content,
  #footer {
    padding: 80px 5%;
  }
  
  #header {
    padding: 140px 5%;
  }
  
  #header .content .info .title {
    font-size: 55px;
  }
  
  .navbar .links .link {
    font-size: 16px;
    padding: 10px 15px;
  }
  
  .navbar .links {
    gap: 30px;
  }
  
  #contacts .content .columns {
    gap: 50px;
  }
  
  #contacts .content .columns .contact-form {
    padding: 35px;
    gap: 30px;
  }
}

/* Tablets */
@media screen and (max-width: 867px) {
  #header .content .info .title {
    font-size: 45px;
  }
  
  #header .content .description {
    font-size: 16px;
    line-height: 1.7;
  }
  
  #header .content {
    gap: 30px;
  }
  
  section:not(#header) .content {
    padding: 70px 5%;
  }
  
  #footer {
    flex-direction: column;
    text-align: center;
    gap: 35px;
    padding: 70px 5%;
  }
  
  #contacts .content .columns {
    flex-direction: column;
    gap: 40px;
  }
  
  #contacts .content .columns .contact-form {
    min-width: 100%;
    padding: 30px;
    gap: 30px;
  }
}

/* Small tablets and large phones */
@media screen and (max-width: 600px) {
  .navbar {
    padding: 20px 20px;
  }
  
  .navbar .links {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  .navbar .links .link {
    text-align: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  section:not(#header) .content,
  #footer {
    padding: 60px 4%;
  }
  
  #header {
    padding: 120px 20px;
    min-height: 50vh;
  }
  
  #header .content {
    gap: 25px;
  }
  
  #header .content .info .title {
    font-size: 35px;
    line-height: 1.2;
  }
  
  #header .content .info .minecraft-server-ip {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  #header .content .description {
    font-size: 15px;
    padding: 0 10px;
    line-height: 1.7;
  }
  
  #contacts .content .columns .contact-form {
    padding: 25px;
    gap: 25px;
  }
  
  #contacts .content .columns .contact-form .form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  
  #contacts .content .columns .contact-form .form-footer button {
    width: 100%;
    text-align: center;
    padding: 14px 30px;
  }
  
  .row input,
  .row textarea,
  .row select {
    padding: 15px 20px;
    font-size: 15px;
  }
  
  .row textarea {
    min-height: 180px;
  }
}

/* Very small phones */
@media screen and (max-width: 400px) {
  .navbar {
    padding: 15px;
  }
  
  #header {
    padding: 100px 15px;
  }
  
  #header .content .info .title {
    font-size: 28px;
  }
  
  #header .content .info .minecraft-server-ip {
    font-size: 14px;
  }
  
  #header .content .description {
    font-size: 14px;
  }
  
  section:not(#header) .content,
  #footer {
    padding: 50px 3%;
  }
  
  #contacts .content .columns .contact-form {
    padding: 20px;
    gap: 20px;
  }
  
  .row input,
  .row textarea,
  .row select {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .row textarea {
    min-height: 150px;
  }
  
  #contacts .content .columns .contact-form .form-footer button {
    padding: 12px 25px;
    font-size: 15px;
  }
}

/* Landscape phones */
@media screen and (max-height: 500px) and (orientation: landscape) {
  #header {
    min-height: 80vh;
    padding: 80px 10%;
  }
  
  #header .content .info .title {
    font-size: 40px;
  }
  
  .navbar {
    padding: 10px 5%;
  }
  
  .navbar .links {
    gap: 15px;
  }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
  #header {
    background-attachment: scroll; /* Better performance on high DPI */
  }
}

/* Print styles */
@media print {
  * {
    background: white !important;
    color: black !important;
  }
  
  .navbar,
  #header {
    display: none;
  }
  
  section:not(#header) .content {
    padding: 20px 0;
  }
}