body {
    background: #eef1f5;
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 30px;
}

.card {
    max-width: 550px;
    background: #fff;
    margin: auto;
    padding: 30px 40px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card h2 {
    text-align: center;
    margin-bottom: 18px;
    color: #222;
    font-size: 26px;
}

.card p {
    text-align: center;
    margin-bottom: 25px;
    color: #555;
}

label {
    display: block;
    margin-bottom: 18px;
    font-weight: 600;
    color: #333;
}

label i {
    margin-right: 6px;
    color: #5672ff;
}

input {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 15px;
    transition: 0.2s;
}

input:focus {
    border-color: #5672ff;
    box-shadow: 0 0 4px rgba(86,114,255,0.4);
}

button {
    width: 100%;
    padding: 3px;
    margin-top: 5px;
    background: #7384d7;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s;
}

button i {
    margin-right: 6px;
}

button:hover {
    background: #4259d6;
}

.result {
    margin-top: 25px;
    padding-top: 10px;
}

/* Table */
table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

table th, table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

table th {
    background: #f3f4f6;
}

.status.open {
    color: #1cbf3f;
    font-weight: bold;
}

.status.closed {
    color: #d33;
    font-weight: bold;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 55px;
    height: 55px;
    border: 6px solid #fff;
    border-top: 6px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 15px;
    font-size: 18px;
    color: #fff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade on load */
.fade-in {
    animation: fade 0.4s ease;
}

@keyframes fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.copy-btn {
  width: 20px;
  height: 20px;
  padding: 11px;
  margin-left: 6px; /* sát IP */
  border-radius: 50%; /* tròn */
  border: none;
  background: #958715;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: 0.2s;
}

.copy-btn:hover {
  background: #c976ef;
}

.copy-btn.success {
  background: #2ecc71 !important;
  color: white !important;
}


.copy-success-popup {
  position: absolute;
  background: #2ecc71;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  top: -28px;
  right: 0;
  opacity: 0;
  animation: fadePop 1.2s forwards;
  white-space: nowrap;
}

@keyframes fadePop {
  0% { opacity: 0; transform: translateY(6px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* Container cho IP + nút */
.ip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#scanForm label i {
    line-height: 1;
}

/* INPUT */
#scanForm input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

/* NÚT KIỂM TRA */
#scanForm button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 4px;
}
/*footer*/
footer.copyright {
  margin-top: 25px;
  text-align: center;
  font-size: 13px;
  color: #777;
  padding: 10px 0;
  opacity: 0.8;
}

footer.copyright:hover {
  opacity: 1;
  color: #555;
}

/*footer js*/ 
  .site-copyright {
    opacity: 0.5;                       /* luôn mờ */
    color: #666;                        /* màu mặc định */
    transition: opacity 0.25s, color 0.25s;
    user-select: none;
  }
  .site-copyright:hover {
    opacity: 1;                         /* khi hover rõ */
    color: #2ecc71;                     /* khi hover đổi màu */
  }
  
/*CSS cho 3 nút copy IP*/
.copy-public-ip {
    opacity: 0.5;
    transition: 0.2s;
    position: relative;
    cursor: pointer;
    margin-left: 4px;
}

.copy-public-ip:hover {
    opacity: 1;
    color: #2196F3;
}

.tooltip {
    position: absolute;
    top: -22px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
}
/*đổi màu khi copy */
.toast {
    position: fixed;
    bottom: 20px;       
    left: 20px;
    background: #28a745; /* xanh thành công */
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.toast.show {
    opacity: 1;
    transform: translateY(0px);
}

.toast i {
    font-size: 16px;
}

.copy-ip-main {
    margin-left: 6px;
    padding: 2px 8px;
    border: 1px solid #5c9110;
    background: #efeaea;
    color: #6470b6;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.copy-ip-main:hover {
    background: #5c9110;
    color: #ffffff;
    border: 1px solid #5c9110;
}


