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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Cascadia Code', 'Consolas', 'Segoe UI', monospace;
    background: #0f172a;
    color: #f1f5f9;
}

.view {
    padding: 20px;
}

#form-view {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 40px;
}

/* ── Formulario ─────────────────────────────────────────── */

#student-form {
    width: 200px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    background: #334155;
    color: #f1f5f9;
    outline: none;
    transition: background 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    background: #475569;
    box-shadow: 0 0 0 2px #3b82f6;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    background: #3b82f6;
    color: #f1f5f9;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    width: 200px;
    margin-top: 12px;
    padding: 10px;
    background: #7f1d1d;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    font-size: 12px;
    color: #fecaca;
}

/* ── Vista conectada ─────────────────────────────────────── */

#connected-view {
    padding: 0 !important;
    width: 100%;
    height: 100vh;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.btn-exit {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 3px 6px;
    border: none;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    background: #ef4444;
    color: #f1f5f9;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.btn-exit:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-exit:active {
    transform: scale(0.95);
}

.pulse-indicator {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    animation: breathe 3s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow: 0 0 60px rgba(59, 130, 246, 0.9);
    }
}
