/* =========================
   СТИЛИ ДЛЯ СТРАНИЦЫ СЕРВЕРОВ
========================= */

/* =========================
   КАРТОЧКИ СЕРВЕРОВ
========================= */
.server-header {
    display: flex;
    align-items: center;
    gap: 0.5rem; 
    margin-bottom: 15px;
}

.server-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    background: #f8f8f8;
    padding: 2px;
    box-sizing: border-box;
}

body.dark .server-icon {
    border-color: #444;
    background: #333;
}

.server-info {
    flex: 1;
    min-width: 0; /* Для правильного обрезания текста */
}

.server-info h3 {
    margin: 0 0 5px 0;
    color: #0077cc;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .server-info h3 {
    color: #66ccff;
}

.server-status {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-status.online {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.server-status.offline {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.server-status.loading {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

body.dark .server-status.online {
    background: #1b5e20;
    color: #a5d6a7;
    border-color: #2e7d32;
}

body.dark .server-status.offline {
    background: #b71c1c;
    color: #ef9a9a;
    border-color: #c62828;
}

body.dark .server-status.loading {
    background: #e65100;
    color: #ffcc80;
    border-color: #ef6c00;
}

.server-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark .server-description {
    color: #ccc;
}

.server-details {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #0077cc;
}

body.dark .server-details {
    background: #333;
    border-left-color: #66ccff;
}

.server-version {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.server-ip {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0077cc;
    background: rgba(0, 119, 204, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 119, 204, 0.2);
    cursor: pointer;
    transition: 0.3s;
}

.server-ip:hover {
    background: rgba(0, 119, 204, 0.2);
    border-color: rgba(0, 119, 204, 0.4);
}

body.dark .server-ip {
    color: #66ccff;
    background: rgba(102, 204, 255, 0.1);
    border-color: rgba(102, 204, 255, 0.2);
}

.connect-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-top: auto;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0077cc, #005fa3);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.connect-btn:hover {
    background: linear-gradient(135deg, #005fa3, #004d80);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3);
}

.connect-btn:active {
    transform: translateY(0);
}

body.dark .connect-btn {
    background: linear-gradient(135deg, #66ccff, #3399cc);
}

body.dark .connect-btn:hover {
    background: linear-gradient(135deg, #3399cc, #0077cc);
}

.loading, .message, .error-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    grid-column: 1 / -1;
    font-size: 1.1rem;
}

body.dark .loading, 
body.dark .message, 
body.dark .error-message {
    color: #ccc;
}

.error-message {
    color: #c62828;
    background: #ffebee;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
}

body.dark .error-message {
    color: #ef9a9a;
    background: #b71c1c;
    border-color: #c62828;
}

/* Адаптивность для серверов */
@media (max-width: 768px) {
    .server-header {
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .server-icon {
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }
    
    .server-info h3 {
        font-size: 1.1rem;
    }
    
    .server-status {
        font-size: 0.75em;
        padding: 2px 8px;
    }
    
    .server-details {
        padding: 10px;
    }
    
    .server-version {
        font-size: 0.85em;
    }
    
    .connect-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .server-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .server-icon {
        width: 60px;
        height: 60px;
    }
    
    .server-info {
        width: 100%;
    }
    
    .server-info h3 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .server-description {
        text-align: center;
        -webkit-line-clamp: 4;
    }
    
    .server-details {
        text-align: center;
    }
    
    .server-version {
        justify-content: center;
    }
}

/* Анимации для серверов */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для скопированного IP */
.server-ip.copied {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

body.dark .server-ip.copied {
    background: #388E3C;
    color: white;
    border-color: #388E3C;
}

/* Уведомление о копировании IP */
.server-toast {
  position: fixed;
  top: 20px;
  right: -350px;
  background: #4caf50;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
}

/* Когда показываем */
.server-toast.show {
  right: 20px;
  opacity: 1;
}

/* =========================
   КАРТОЧКИ ДЛЯ СТРАНИЦЫ SERVERS
========================= */
.server-cards {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.server-card {
  background: linear-gradient(135deg, #ffffff, #f3f9ff);
  border-left: 6px solid #0077cc;
  border-radius: 10px;
  padding: 1.7rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

body.dark .server-card {
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  border-left-color: #66ccff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
}

.server-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.15);
}

body.dark .server-card:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.55);
}

.server-card h3 {
  margin: 0 0 0.8rem 0;
  font-size: 1.3rem;
  color: #0077cc;
}

body.dark .server-card h3 {
  color: #66ccff;
}

.server-card p {
  margin-bottom: 1.2rem;
  opacity: 0.9;
}

.server-card .server-btn {
  background: #0077cc;
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.server-card .server-btn:hover {
  background: #005fa3;
  transform: translateY(-2px);
}

body.dark .server-card .server-btn {
  background: #66ccff;
  color: #111;
}

body.dark .server-card .server-btn:hover {
  background: #3ea8d8;
}

.bedrock-note {
    color: #c74343;       /* Красный, но не слишком яркий */
    background: rgba(199, 67, 67, 0.08);
    border-left: 3px solid #c74343;
    padding: 6px 10px;
    font-size: 0.9rem;
    margin-top: 8px;
    border-radius: 4px;
}

body.dark .bedrock-note {
    color: #ff8a8a;
    border-left-color: #ff8a8a;
    background: rgba(255, 138, 138, 0.1);
}

.bedrock-port {
    cursor: pointer;
}