* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('132375588_p0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
    position: relative;
}

/* Overlay oscuro para mejorar legibilidad */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
    margin-bottom: 0;
    font-size: 2.5em;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.ip-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.ip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #3a3a3a;
    border-radius: 8px;
}

.ip-label {
    font-weight: bold;
    color: #b0b0b0;
}

.ip-value {
    color: #667eea;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

main {
    display: grid;
    gap: 30px;
}

section {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.servers-list {
    display: grid;
    gap: 15px;
}

.server-card {
    background: #3d3d3d;
    border: 2px solid #555555;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.server-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: #444444;
}

.server-card.online {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.15);
}

.server-card.offline {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.15);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.server-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #ffffff;
}

.server-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-online {
    background: #28a745;
    color: white;
}

.status-offline {
    background: #dc3545;
    color: white;
}

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85em;
    color: #cccccc;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffffff;
}

.server-card.online .info-label {
    color: #b0e0b0;
}

.server-card.online .info-value {
    color: #ffffff;
}

.server-card.offline .info-label {
    color: #ffcccc;
}

.server-card.offline .info-value {
    color: #ffffff;
}

.server-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.server-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #e0e0e0;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #4a4a4a;
    border-radius: 5px;
    font-size: 1em;
    background: #3a3a3a;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    margin-top: 5px;
    color: #b0b0b0;
    font-size: 0.85em;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #b0b0b0;
    font-size: 1.2em;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #b0b0b0;
}

.empty-state p {
    margin-top: 10px;
    font-size: 1.1em;
}

/* Modal de Admin */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #2d2d2d;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #e0e0e0;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover,
.close-players:hover {
    color: #fff;
}

.close-players {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

/* Modal de jugadores - más ancho */
#players-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.players-list-modal {
    max-height: 400px;
    overflow-y: auto;
}

.player-item-server {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #3a3a3a;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.player-item-server:hover {
    background: #4a4a4a;
}

.player-name-server {
    font-weight: bold;
    color: #e0e0e0;
    font-size: 1.1em;
}

/* Sección de VIPs */
.vips-section {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.vips-list {
    display: grid;
    gap: 15px;
}

.vip-card {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #ffd700;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.5);
}

.vip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.vip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.vip-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.vip-status {
    padding: 5px 15px;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.vip-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.vip-card .info-label {
    color: #8b6914;
}

.vip-card .info-value {
    color: #1a1a1a;
    font-weight: bold;
}

/* Sección de Bans */
.bans-section {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 30px;
}

.bans-list {
    display: grid;
    gap: 15px;
}

.ban-card {
    background: rgba(220, 53, 69, 0.15);
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.ban-card.suspected {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

.ban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.5);
    background: rgba(220, 53, 69, 0.2);
}

.ban-card.suspected:hover {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.5);
    background: rgba(220, 53, 69, 0.15);
}

.ban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ban-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #ff6b6b;
}

.ban-card.suspected .ban-name {
    color: #ff6b6b;
}

.ban-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.ban-status.banned {
    background: #dc3545;
    color: white;
}

.ban-status.suspected {
    background: #dc3545;
    color: white;
}

.ban-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.ban-card .info-label {
    color: #ffcccc;
}

.ban-card .info-value {
    color: #ffffff;
}

/* Sección de Cola */
.queue-section {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.queue-description {
    color: #b0b0b0;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.queue-description span {
    color: #667eea;
    font-weight: bold;
}

.queue-status {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: #3a3a3a;
    border-radius: 10px;
}

.status-item {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.9em;
    color: #b0b0b0;
    margin-bottom: 5px;
}

.status-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #e0e0e0;
}

.queue-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.queue-form input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #4a4a4a;
    border-radius: 5px;
    font-size: 1em;
    background: #3a3a3a;
    color: #e0e0e0;
}

.queue-form input:focus {
    outline: none;
    border-color: #667eea;
}

.queue-players {
    margin-top: 30px;
}

.queue-players h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.players-list {
    display: grid;
    gap: 10px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #3a3a3a;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.player-name {
    font-weight: bold;
    color: #e0e0e0;
}

.player-time {
    font-size: 0.9em;
    color: #b0b0b0;
}

.player-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.empty-queue {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Chat de la Cola */
.queue-chat {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #4a4a4a;
}

.queue-chat h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    background: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #2d2d2d;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.chat-message.system {
    border-left-color: #6c757d;
    background: #3a3a3a;
}

.chat-message.own {
    border-left-color: #28a745;
    background: #2d3a2d;
}

.chat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.chat-content {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.chat-player-name {
    font-weight: bold;
    color: #e0e0e0;
    font-size: 0.95em;
}

.chat-time {
    font-size: 0.8em;
    color: #999;
}

.chat-text {
    color: #d0d0d0;
    word-wrap: break-word;
}

.empty-chat {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-container input {
    flex: 1;
    padding: 10px;
    border: 2px solid #4a4a4a;
    border-radius: 5px;
    font-size: 1em;
    background: #3a3a3a;
    color: #e0e0e0;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-container .btn {
    padding: 10px 20px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .ip-info {
        flex-direction: column;
        gap: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .server-info {
        grid-template-columns: 1fr;
    }

    .queue-form {
        flex-direction: column;
    }

    .queue-form input {
        width: 100%;
    }

    .queue-status {
        flex-direction: column;
        gap: 15px;
    }

    .chat-input-container {
        flex-direction: column;
    }

    .chat-input-container input {
        width: 100%;
    }
}

