/* Reseta estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Cabeçalho estilizado */
.header {
    background-color: #007BFF;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #0056b3;
}

.header h1 {
    font-size: 2em;
    font-weight: 400;
}

/* Estilos para containers */
.container {
    margin: 20px auto;
    width: 90%;
    max-width: 800px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.container h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #007BFF;
}

.container p {
    font-size: 1em;
    color: #6c757d;
}

.button-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    flex: 1;
    min-width: 120px;
}

button#connectNewBtn {
    background-color: #28a745;
    color: #ffffff;
}

button#checkStatusBtn, #viewSessionsBtn {
    background-color: #17a2b8;
    color: #ffffff;
}

/* Modal básico */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Conteúdo do modal */
.modal-content {
    position: relative;
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Botão de fechar no canto superior direito */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 15px;
        max-width: 400px;
    }

    .modal-content input, .modal-content select, .modal-content button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        padding: 10px;
        max-width: 350px;
    }

    .close {
        top: 8px;
        right: 12px;
        font-size: 20px;
    }
}

/* Estilos para spinner de carregamento */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos responsivos para dispositivos móveis */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5em;
    }

    .container {
        padding: 15px;
    }

    .container h2 {
        font-size: 1.3em;
    }

    .button-container button {
        font-size: 0.9em;
        padding: 8px;
        min-width: 100px;
    }

    .modal-content {
        width: 90%;
        padding: 15px;
    }

    .modal-content h2 {
        font-size: 1.3em;
    }

    .close {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.2em;
    }

    .container h2 {
        font-size: 1.1em;
    }

    .button-container button {
        font-size: 0.8em;
        padding: 6px;
    }

    .modal-content h2 {
        font-size: 1.1em;
    }

    .close {
        font-size: 1em;
    }
}

/* Formulário no modal */
.modal-content form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.modal-content label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-top: 10px;
    text-align: left;
    width: 90%;
}

.modal-content input, .modal-content select {
    padding: 10px;
    width: 90%;
    margin: 8px 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-content button[type="submit"] {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.modal-content button[type="submit"]:hover {
    background-color: #2980b9;
}

/* Container para exibir QR Code e status */
.qr-code-display, .status-display {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fafafa;
}

/* Card de status melhorado */
.status-card {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    font-family: Arial, sans-serif;
}

.status-card h3 {
    text-align: center;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
}

.status-card img {
    display: block;
    margin: 10px auto;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.status-card .status {
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    margin: 10px 0;
}

.status-card .status.online {
    color: #4CAF50;
}

.status-card .status.offline {
    color: #F44336;
}

/* Seções de informações */
.info-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.info-section-title {
    font-size: 1em;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.info-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 0.9em;
    color: #333;
}

.info-item strong {
    width: 120px;
    font-weight: 600;
    color: #333;
}

.info-item span {
    flex: 1;
    text-align: right;
    color: #555;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .status-card {
        padding: 15px;
        margin: 10px;
    }

    .status-card h3 {
        font-size: 1.3em;
    }

    .status-card img {
        width: 80px;
        height: 80px;
    }

    .status-card .status {
        font-size: 1em;
    }

    .info-item {
        font-size: 0.85em;
    }

    .info-item strong {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .status-card {
        padding: 10px;
    }

    .status-card h3 {
        font-size: 1.2em;
    }

    .status-card img {
        width: 70px;
        height: 70px;
    }

    .status-card .status {
        font-size: 0.95em;
    }

    .info-section-title {
        font-size: 0.9em;
    }

    .info-item {
        font-size: 0.8em;
        flex-direction: column;
        align-items: flex-start;
    }

    .info-item strong {
        width: auto;
        margin-bottom: 5px;
    }

    .info-item span {
        text-align: left;
    }
}

