* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Mine-font';
    src: url('font/mine-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #68cd0ac5 0%, #17670bbd 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    text-align: center;
    font-weight: normal;
    letter-spacing: 1px;
}

.mine-font {
    font-family: 'Mine-font', 'Segoe UI', sans-serif;
}

.subtitle {
    text-align: center;
    color: #7a7a7a;
    font-size: 0.85em;
    margin: 6px 0 22px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

h2 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.card:last-of-type {
    margin-bottom: 0;
}

/* ---------- status ---------- */

.status-card {
    gap: 14px;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: default;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: #adadad;
}

.dot-online {
    background: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.18);
}

.dot-offline {
    background: #adadad;
}

.dot-busy {
    background: #ffc107;
    animation: pulse 1.2s ease-in-out infinite;
}

.dot-unknown {
    background: #ced4da;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.connect {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.connect-row {
    display: grid;
    grid-template-columns: 4.6em auto 1fr;
    align-items: center;
    gap: 8px;
}

.connect-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8a8a8a;
}

.connect-row code {
    background: #e9ecef;
    border-radius: 5px;
    padding: 6px 11px;
    font-size: 0.95em;
    word-break: break-all;
    justify-self: start;
}

.connect-note {
    font-size: 0.72em;
    color: #9a9a9a;
    line-height: 1.3;
}

.btn-ghost {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    font-size: 1em;
}

.btn-ghost:hover {
    background: #e2e6ea;
    color: #333;
    transform: none;
    box-shadow: none;
}

.meta {
    display: flex;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.meta dt {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8a8a8a;
    margin-bottom: 2px;
}

.meta dd {
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
}

.player-list {
    font-size: 0.85em;
    color: #555;
    text-align: center;
}

/* ---------- botoes ---------- */

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-executar {
    width: 100%;
    max-width: 20em;
    margin-bottom: 15px;
}

.btn-stop {
    background: linear-gradient(135deg, #e0564f 0%, #a32b25 100%);
}

.btn-stop:hover:not(:disabled) {
    box-shadow: 0 5px 15px rgba(224, 86, 79, 0.4);
}

.card i {
    margin-left: 6px;
}

/* ---------- resultado ---------- */

.result-box {
    background: #e9ecef;
    border-radius: 5px;
    padding: 15px;
    min-height: 50px;
    width: 100%;
    color: #333;
    font-size: 14px;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.result-box.success {
    background: #eeeeee;
    color: #155724;
    border-left: 4px solid #28a745;
}

.result-box.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.result-box.loading {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.hint {
    margin-top: 18px;
    font-size: 0.78em;
    color: #8a8a8a;
    text-align: center;
    line-height: 1.5;
}

.i-spinner {
    animation: spin 1s linear infinite;
    font-size: 20px;
    display: inline-block;
    margin-right: 8px;
}

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

.hidden {
    display: none !important;
}

/* ---------- modal ---------- */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(-50%) scale(1);
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px 0;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#passkey {
    margin-bottom: 1em;
    width: 80%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#passkey:focus {
    border-color: #667eea;
    outline: none;
}

.modal-error {
    color: #721c24;
    font-size: 0.85em;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .container {
        padding: 22px 18px;
    }

    .meta {
        gap: 20px;
    }
}
