/* serverlist.css - Advanced Modern UI for Minecraft Server List */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

@keyframes borderRotate {
  100% {
    --angle: 420deg;
  }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 90deg;
  inherits: true;
}


/* Header */
.header-container {
    text-align: center;
    margin: 50px auto 30px;
}

.last-modified {
    margin-bottom: 6px;
    margin-top: 20px;
}

.page-title {
    font-size: 2.8rem;
    letter-spacing: 1.5px;
    margin: 0;
    text-decoration: underline;
}

/* Server List Layout */
.server-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Gradient Border Wrapper */
.box {
  position: relative;
  border-radius: 12px;
  padding: 0; /* padding on .server-card */
  display: block;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
  overflow: visible;
}

.box:hover {
  box-shadow: 0 0 20px rgba(176, 11, 231, 0.7);
}

/* Gradient animated border using ::before */
.box::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  right: -0.5rem;
  bottom: -0.5rem;
  border-radius: 20px;
  padding: 0.5rem; /* border thickness */
  background: conic-gradient(
    from var(--angle),
    rgba(136, 10, 179, 0.15),
    rgb(205, 2, 209) 0.1turn,
    rgba(205, 2, 209) 0.15turn,
    rgba(120, 6, 158, 0.15) 0.25turn
  );
  -webkit-mask:
    linear-gradient(#ffffff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: borderRotate 3000ms linear infinite forwards;
  pointer-events: none;
  z-index: 0;
}

/* Server Card */
.server-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease both;
    animation-delay: calc(var(--i, 1) * 0.05s);
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.server-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(113, 2, 87, 0.3);
}

/* Card Content */
.server-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.server-status {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.server-status.online {
    background: #0f0;
    color: #ffffff;
}

.server-status.offline {
    background: #d50000;
    color: #fff;
}

.server-detail {
    font-size: 0.95rem;
    margin-bottom: 6px;
}


.motd {
    font-size: 2rem;
    margin-top: 10px;
    border-top: 1px solid #333;
    padding-top: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .page-title {
        font-size: 2rem;
    }

    .server-card {
        padding: 16px;
    }
}

.magic-text {
  display: inline-block;
  position: relative;
  font-family: monospace;
  color: #ffaa00;
  font-style: italic;
}

.magic-text::before {
  content: attr(data-char);
  animation: magic 0.1s infinite steps(1);
}

@keyframes magic {
  0%   { content: 'l'; }
  20%  { content: 'z'; }
  40%  { content: 'x'; }
  60%  { content: 'g'; }
  80%  { content: 'k'; }
  100% { content: 'i'; }
}
