  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(160deg, #0c0a0a, #2a0f0f);
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    min-height: 100vh;
  }

  h1 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ff4c4c;
    text-shadow: 0 0 8px rgba(255, 76, 76, 0.6);
  }

  .input-group {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
  }

  .input-group input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px 0 0 12px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: #1a0c0c;
    color: #f5f5f5;
    border-right: 1px solid #ff4c4c;
    transition: background 0.3s;
  }

  .input-group input:focus {
    background: #2b1212;
  }
  
  #responseTime {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin: auto;
    width: 100%;
  }

  .input-group button {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a0c0c;
    background: #ff4c4c;
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
  }

  .input-group button:hover {
    background: #ff1a1a;
    transform: scale(1.03);
  }

  .dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1200px;
  }

  .panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 76, 76, 0.3);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 250px;
    max-height: 250px;       /* start at square-ish height */
    width: 100%;             /* width controlled by grid */
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s ease;
  }

  .panel:has(#fullInfo):hover {
    max-height: 425px;       /* allow vertical expansion */
    transform: scale(1.02);
    z-index: 5;
  }

  #fullInfo {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;

    color: #ffb3b3;           /* softer red text */
    font-family: 'Inter', monospace;
    line-height: 1.4;
    font-size: 0.9rem;

    background: rgba(255, 76, 76, 0.05);
    border-radius: 12px;
    padding: 12px;
  }

  .panel:hover {
    transform: translateY(-5px);
  }

  .panel h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ff4c4c;
  }

  .server-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff4c4c;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 6px rgba(255, 76, 76, 0.5);
  }

  .motd {
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    line-height: 1.3rem;
    word-break: break-word;
    flex: 1;
  }

  .players {
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    margin-top: 10px;
    color: #f5f5f5;
    overflow-x: auto;
  }

  img {
    width: 128px;
    height: 128px;
    border-radius: 16px;
    border: 2px solid #ff4c4c;
    margin-top: 12px;
    align-self: center;
  }

  .api-info {
    grid-column: 1 / -1;         /* full width */
    margin-top: 24px;
    min-height: unset;           /* let height adapt to content */
    aspect-ratio: auto !important; /* override the 1/1 from .panel */
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 76, 76, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    transition: all 0.25s ease;
  }

  footer {
    position: fixed;    /* fixes it relative to the viewport */
    bottom: 0;          /* stick to bottom */
    left: 0;
    width: 100%;        /* span full width */
    text-align: center; /* keep your text centered */
    margin: 0;
    padding: 10px 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.2); /* optional: translucent bg so it’s readable */
  }

  /* MOTD color/style mapping */
  .c0{color:#000000}.c1{color:#0000AA}.c2{color:#00AA00}.c3{color:#00AAAA}.c4{color:#AA0000}
  .c5{color:#AA00AA}.c6{color:#FFAA00}.c7{color:#AAAAAA}.c8{color:#555555}.c9{color:#5555FF}
  .ca{color:#55FF55}.cb{color:#55FFFF}.cc{color:#FF5555}.cd{color:#FF55FF}.ce{color:#FFFF55}
  .cf{color:#FFFFFF}.bold{font-weight:bold}.italic{font-style:italic}.underlined{text-decoration:underline}
  .strikethrough{text-decoration:line-through}.obfuscated{filter:blur(2px);user-select:none;}